home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 83 / MacAddict_083_2003-07.iso / mac / Software / Development / VLC Source 0.5.3.dmg / configure.ac < prev    next >
Text File  |  2003-04-08  |  132KB  |  3,623 lines

  1.  
  2. dnl ################################################################
  3. dnl # Do not edit this file, it was generated from configure.ac.in #
  4. dnl ################################################################
  5.  
  6. dnl Autoconf settings for vlc
  7.  
  8. AC_INIT(vlc,0.5.3)
  9.  
  10. CONFIGURE_LINE="$0 $*"
  11. CODENAME="Natalya"
  12.  
  13. AC_PREREQ(2.50)
  14. AC_CONFIG_SRCDIR(src/libvlc.c)
  15. AC_CONFIG_AUX_DIR(autotools)
  16. AC_CANONICAL_SYSTEM
  17.  
  18. dnl XXX: we don't put any flags here, because automake 1.5 doesn't support
  19. dnl them. And we need the comma otherwize automake will choke on it.
  20. AM_INIT_AUTOMAKE(vlc,0.5.3)
  21. AM_CONFIG_HEADER(config.h)
  22.  
  23. dnl
  24. dnl  Save *FLAGS
  25. dnl
  26. CPPFLAGS_save="${CPPFLAGS}"
  27. CFLAGS_save="${CFLAGS}"
  28. CXXFLAGS_save="${CXXFLAGS}"
  29. OBJCFLAGS_save="${OBJCFLAGS}"
  30. LDFLAGS_save="${LDFLAGS}"
  31.  
  32. dnl
  33. dnl Check for tools
  34. dnl
  35. AC_PROG_CC
  36. AM_PROG_CC_C_O
  37. AC_PROG_CPP
  38. AC_PROG_CXX
  39. AC_PROG_MAKE_SET
  40. AC_PROG_INSTALL
  41.  
  42. dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right
  43. dnl now otherwise it might be set in an obscure if statement.
  44. AC_EGREP_CPP(foo,foo)
  45.  
  46. dnl AC_PROG_OBJC doesn't seem to exist, this is the KDE workaround
  47. AC_MSG_CHECKING(for an Objective-C compiler)
  48. OBJC="${CXX}"
  49. AC_SUBST(OBJC)
  50. OBJCFLAGS="${CXXFLAGS} -fgnu-runtime -fconstant-string-class=NSConstantString"
  51. AC_SUBST(OBJCFLAGS)
  52. dnl _AM_DEPENDENCIES(OBJC) doesn't work, so hard code OBJCDEPMODE here
  53. #OBJCDEPMODE="depmode=gcc3"
  54. #AC_SUBST(OBJCDEPMODE)
  55. _AM_DEPENDENCIES(OBJC)
  56. AC_MSG_RESULT(not implemented yet)
  57.  
  58. dnl Find the right ranlib, even when cross-compiling
  59. AC_CHECK_TOOL(RANLIB, ranlib, :)
  60. AC_CHECK_TOOL(STRIP, strip, :)
  61. AC_CHECK_TOOL(AR, ar, :)
  62. AC_CHECK_TOOL(LD, ld, :)
  63.  
  64. dnl AM_PROG_LIBTOOL
  65. AC_PROG_INSTALL
  66.  
  67. dnl Check for compiler properties
  68. AC_C_CONST
  69. AC_C_INLINE
  70.  
  71. dnl
  72. dnl  Set default values
  73. dnl
  74. LDFLAGS_vlc="${LDFLAGS}"
  75. LIBEXT=".so"
  76.  
  77. dnl
  78. dnl  Check the operating system
  79. dnl
  80. case "x${target_os}" in
  81.   x)
  82.     SYS=unknown
  83.     ;;
  84.   xlinux*)
  85.     SYS=linux
  86.     ;;
  87.   xbsdi*)
  88.     SYS=bsdi
  89.     CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
  90.     LDFLAGS_dvd="${LDFLAGS_dvd} -ldvd"
  91.     LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -ldvd"
  92.     LDFLAGS_vcd="${LDFLAGS_vcd} -ldvd"
  93.     ;;
  94.   x*bsd*)
  95.     SYS="${target_os}"
  96.     CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
  97.     ;;
  98.   xdarwin*)
  99.     SYS=darwin
  100.     CFLAGS_save="${CFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; CFLAGS="${CFLAGS_save}"
  101.     CXXFLAGS_save="${CXXFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; CXXFLAGS="${CXXFLAGS_save}"
  102.     OBJCFLAGS_save="${OBJCFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; OBJCFLAGS="${OBJCFLAGS_save}"
  103.     LDFLAGS_vlc="${LDFLAGS_vlc} -all_load"
  104.     LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -all_load"
  105.     LIBEXT=".dylib"
  106.     ;;
  107.   x*mingw32* | x*cygwin*)
  108.     AC_CHECK_TOOL(WINDRES, windres, :)
  109.     LIBEXT=".dll"
  110.  
  111.     case "x${target_os}" in
  112.       x*mingw32*)
  113.         SYS=mingw32
  114.         ;;
  115.       x*cygwin*)
  116.         dnl Check if we are using the mno-cygwin mode in which case we are
  117.         dnl actually dealing with a mingw32 compiler.
  118.         AC_EGREP_CPP(yes,
  119.             [#ifdef WIN32
  120.              yes
  121.              #endif],
  122.             SYS=mingw32, SYS=cygwin)
  123.         ;;
  124.     esac
  125.  
  126.     if test "x$SYS" = "xmingw32"; then
  127.         # add ws2_32 for closesocket, select, recv
  128.         CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"
  129.         CPPFLAGS="${CPPFLAGS_save}"
  130.         LDFLAGS_vlc="${LDFLAGS_vlc} -lws2_32 -lnetapi32 -lwinmm -mwindows"
  131.         LDFLAGS_ipv4="${LDFLAGS_ipv4} -lws2_32"
  132.         LDFLAGS_ipv6="${LDFLAGS_ipv6} -lws2_32"
  133.         LDFLAGS_access_http="${LDFLAGS_access_http} -lws2_32"
  134.         LDFLAGS_access_mms="${LDFLAGS_access_mms} -lws2_32"
  135.         LDFLAGS_access_udp="${LDFLAGS_access_udp} -lws2_32"
  136.         LDFLAGS_access_ftp="${LDFLAGS_access_ftp} -lws2_32"
  137.         LDFLAGS_access_output_udp="${LDFLAGS_access_output_udp} -lws2_32"
  138.         LDFLAGS_sap="${LDFLAGS_sap} -lws2_32"
  139.         LDFLAGS_slp="${LDFLAGS_slp} -lws2_32"
  140.         LDFLAGS_httpd="${LDFLAGS_httpd} -lws2_32"
  141.     fi
  142.     ;;
  143.   x*nto*)
  144.     SYS=nto
  145.     LDFLAGS_x11="${LDFLAGS_x11} -lsocket"
  146.     LDFLAGS_xvideo="${LDFLAGS_xvideo} -lsocket"
  147.     ;;
  148.   xsolaris*)
  149.     SYS=solaris
  150.     ;;
  151.   xhpux*)
  152.     SYS=hpux
  153.     LIBEXT=".sl"
  154.     ;;
  155.   xbeos)
  156.     SYS=beos
  157.     CFLAGS_save="${CFLAGS_save} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CFLAGS="${CFLAGS_save}"
  158.     CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CXXFLAGS="${CXXFLAGS_save}"
  159.     LDFLAGS_vlc="${LDFLAGS_vlc} -lbe"
  160.     LDFLAGS_plugins="${LDFLAGS_plugins} -nostart"
  161.     LDFLAGS_beos="${LDFLAGS_beos} -lbe -lmedia -lroot -ltracker -lstdc++.r4 -ltranslation"
  162.     LDFLAGS_access_mms="${LDFLAGS_access_mms} -lsocket"
  163.     LDFLAGS_ipv4="${LDFLAGS_ipv4} -lsocket"
  164.     LDFLAGS_httpd="${LDFLAGS_httpd} -lsocket"
  165.     dnl BONE or not BONE ? only BONE has libbind.so
  166.     AC_CHECK_LIB( bind, inet_ntoa,
  167.         [ LDFLAGS_access_mms="${LDFLAGS_access_mms} -lbind"
  168.           LDFLAGS_ipv4="${LDFLAGS_ipv4} -lbind"
  169.           LDFLAGS_httpd="${LDFLAGS_httpd} -lbind"],
  170.         [])
  171.     ;;
  172.   x*)
  173.     SYS="${target_os}"
  174.     ;;
  175. esac
  176. AM_CONDITIONAL(HAVE_BEOS, test "x${SYS}" = "xbeos")
  177. AM_CONDITIONAL(HAVE_DARWIN, test "x${SYS}" = "xdarwin")
  178. AM_CONDITIONAL(HAVE_WIN32, test "x${SYS}" = "xmingw32")
  179.  
  180. dnl
  181. dnl Gettext stuff
  182. dnl
  183. ALL_LINGUAS="de en_GB fr it ja no ru nl pl sv"
  184. AM_GNU_GETTEXT_VERSION(0.11.5)
  185. AM_GNU_GETTEXT
  186. if test "${nls_cv_force_use_gnu_gettext}" = "yes"; then
  187.   AC_DEFINE(HAVE_INCLUDED_GETTEXT, 1, Define if we use the local libintl)
  188.   INCLUDES="${INCLUDES} -I\\\$(top_srcdir)/intl"
  189. else
  190.   AC_CHECK_FUNCS(textdomain,,[
  191.     AC_CHECK_LIB(intl,textdomain,
  192.       LDFLAGS_vlc="${LDFLAGS_vlc} -lintl"
  193.       LDFLAGS_plugins="${LDFLAGS_plugins} -lintl"
  194.     )
  195.   ])
  196. fi
  197. AM_CONDITIONAL(BUILD_INTL, test "${nls_cv_force_use_gnu_gettext}" = "yes")
  198. XGETTEXT="${XGETTEXT} --keyword=_NS --keyword=_ANS"
  199.  
  200. AC_MSG_CHECKING(for suffix of libraries)
  201. AC_MSG_RESULT(${LIBEXT})
  202.  
  203. dnl Check for the need to include the mingwex lib for mingw32
  204. if test x$SYS = xmingw32
  205. then
  206.     AC_CHECK_LIB(mingwex,opendir,
  207.         AC_CHECK_LIB(mingw32,opendir,LDFLAGS_vlc="${LDFLAGS_vlc}",
  208.             [LDFLAGS_vlc="${LDFLAGS_vlc} -lmingwex"
  209.              LDFLAGS_gtk="${LDFLAGS_gtk} -lmingwex"])
  210.     )
  211. fi
  212.  
  213. dnl Check for fnative-struct or mms-bitfields support for mingw32
  214. if test x$SYS = xmingw32
  215. then
  216.     AC_CACHE_CHECK([if \$CC accepts -mms-bitfields],
  217.         [ac_cv_c_mms_bitfields],
  218.         [CFLAGS="${CFLAGS_save} -mms-bitfields"
  219.          AC_TRY_COMPILE([],,ac_cv_c_mms_bitfields=yes, ac_cv_c_mms_bitfields=no)])
  220.     if test x"$ac_cv_c_mms_bitfields" != x"no"; then
  221.         CFLAGS_save="${CFLAGS_save} -mms-bitfields";
  222.         CXXFLAGS_save="${CXXFLAGS_save} -mms-bitfields";
  223.     else
  224.         AC_CACHE_CHECK([if \$CC accepts -fnative-struct],
  225.             [ac_cv_c_fnative_struct],
  226.             [CFLAGS="${CFLAGS_save} -fnative-struct"
  227.              AC_TRY_COMPILE([],,ac_cv_c_fnative_struct=yes, ac_cv_c_fnative_struct=no)])
  228.         if test x"$ac_cv_c_fnative_struct" != x"no"; then
  229.             CFLAGS_save="${CFLAGS_save} -fnative-struct";
  230.             CXXFLAGS_save="${CXXFLAGS_save} -fnative-struct";
  231.         fi
  232.     fi
  233.  
  234.     CFLAGS="${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
  235. fi
  236.  
  237. dnl Check for fvtable-thunks support for mingw32
  238. if test x$SYS = xmingw32
  239. then
  240. AC_LANG_PUSH(C++)
  241.     AC_CACHE_CHECK([if \$CXX accepts -fvtable-thunks],
  242.         [ac_cv_cxx_fvtable_thunks],
  243.         [CXXFLAGS="${CXXFLAGS_save} -Wall -Werror -fvtable-thunks"
  244.          AC_TRY_COMPILE([],,ac_cv_cxx_fvtable_thunks=yes,
  245.                         ac_cv_cxx_fvtable_thunks=no)])
  246.     if test x"$ac_cv_cxx_fvtable_thunks" = x"yes"; then
  247.         CXXFLAGS_mingw32_special="-fvtable-thunks"
  248.     fi
  249.  
  250.     CXXFLAGS_save="${CXXFLAGS_save} ${CXXFLAGS_mingw32_special}"
  251.     CXXFLAGS="${CXXFLAGS_save}"
  252. AC_LANG_POP(C++)
  253. fi
  254.  
  255. dnl Flags for plugin compilation
  256. case "x${SYS}" in
  257.   xmingw32|xcygwin)
  258.     CFLAGS_pics="${CFLAGS_pics} ${CFLAGS_mingw32_special}"
  259.     CXXFLAGS_pics="${CXXFLAGS_pics} ${CFLAGS_mingw32_special} ${CXXFLAGS_mingw32_special}"
  260.     OBJCFLAGS_pics="${OBJCFLAGS_pics} ${CFLAGS_mingw32_special}"
  261.     CFLAGS_plugins="${CFLAGS_plugins} ${CFLAGS_mingw32_special}"
  262.     CXXFLAGS_plugins="${CXXFLAGS_plugins} ${CFLAGS_mingw32_special} ${CXXFLAGS_mingw32_special}"
  263.     OBJCFLAGS_plugins="${OBJCFLAGS_plugins} ${CFLAGS_mingw32_special}"
  264.     ;;
  265.   x*)
  266.     CFLAGS_pics="${CFLAGS_pics} -fPIC"
  267.     CXXFLAGS_pics="${CXXFLAGS_pics} -fPIC"
  268.     OBJCFLAGS_pics="${OBJCFLAGS_pics} -fPIC"
  269.     CFLAGS_plugins="${CFLAGS_plugins} -fPIC"
  270.     CXXFLAGS_plugins="${CXXFLAGS_plugins} -fPIC"
  271.     OBJCFLAGS_plugins="${OBJCFLAGS_plugins} -fPIC"
  272.     LDFLAGS_plugins="${LDFLAGS_plugins} -fPIC"
  273.     ;;
  274. esac
  275.  
  276. dnl The -DSYS_FOO flag
  277. CPPFLAGS_save="${CPPFLAGS_save} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"; CPPFLAGS="${CPPFLAGS_save}"
  278.  
  279. dnl Check for system libs needed
  280. need_libc=false
  281.  
  282. AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll getenv putenv setenv)
  283.  
  284. dnl Check for usual libc functions
  285. AC_CHECK_FUNCS(strdup strndup atof lseek)
  286. AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp)])
  287. AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp)])
  288.  
  289. AC_CHECK_FUNCS(connect,,[
  290.   AC_CHECK_LIB(socket,connect,
  291.     LDFLAGS_ipv4="${LDFLAGS_ipv4} -lsocket"
  292.     LDFLAGS_vlc="${LDFLAGS_vlc} -lsocket"
  293. )])
  294.  
  295. AC_CHECK_FUNCS(send,,[
  296.   AC_CHECK_LIB(socket,send,
  297.     LDFLAGS_access_http="${LDFLAGS_access_http} -lsocket"
  298.     LDFLAGS_access_mms="${LDFLAGS_access_mms} -lsocket"
  299.     LDFLAGS_access_udp="${LDFLAGS_access_udp} -lsocket"
  300.     LDFLAGS_access_ftp="${LDFLAGS_access_ftp} -lsocket"
  301.     LDFLAGS_sap="${LDFLAGS_sap} -lsocket"
  302.     LDFLAGS_access_output_udp="${LDFLAGS_access_output_udp} -lsocket"
  303. )])
  304.  
  305. AC_CHECK_FUNCS(gethostbyname,,[
  306.   AC_CHECK_LIB(nsl,gethostbyname,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lnsl" LDFLAGS_httpd="${LDFLAGS_httpd} -lnsl",[
  307.     AC_CHECK_LIB(bind,gethostbyname,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lbind" LDFLAGS_httpd="${LDFLAGS_httpd} -lbind")])
  308. ])
  309.  
  310. dnl Check for socklen_t
  311. AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
  312.   [AC_TRY_COMPILE(
  313.      [#include <sys/types.h>
  314.       #include <sys/socket.h>],
  315.      [socklen_t len = 42; return len;],
  316.      ac_cv_type_socklen_t=yes,
  317.      ac_cv_type_socklen_t=no)])
  318. if test x$ac_cv_type_socklen_t != xno; then
  319.   AC_DEFINE(HAVE_SOCKLEN_T, 1,
  320.             Define if <sys/socket.h> defines socklen_t.)
  321. fi
  322.  
  323. AC_CHECK_FUNCS(inet_aton,,[
  324.   AC_CHECK_LIB(resolv,inet_aton,LDFLAGS_ipv4="${LDFLAGS_ipv4} -lresolv" LDFLAGS_httpd="${LDFLAGS_httpd} -lresolv")
  325. ])
  326.  
  327. dnl Check for getopt
  328. need_getopt=false
  329. AC_CHECK_FUNCS(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
  330. [ # FreeBSD has a gnugetopt library for this:
  331.   AC_CHECK_LIB([gnugetopt],[getopt_long],
  332.     [AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) LDFLAGS_vlc="${LDFLAGS_vlc} -lgnugetopt"],
  333.     [need_getopt=:])])
  334. AM_CONDITIONAL(BUILD_GETOPT, ${need_getopt})
  335.  
  336. AC_TYPE_SIGNAL
  337. AC_CHECK_LIB(dl,dlopen,LDFLAGS_vlc="${LDFLAGS_vlc} -ldl")
  338. AC_CHECK_LIB(m,cos,
  339.   LDFLAGS_imdct="${LDFLAGS_imdct} -lm"
  340.   LDFLAGS_adjust="${LDFLAGS_adjust} -lm"
  341.   LDFLAGS_distort="${LDFLAGS_distort} -lm"
  342.   LDFLAGS_a52tofloat32="${LDFLAGS_a52tofloat32} -lm")
  343. AC_CHECK_LIB(m,pow,
  344.   LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lm"
  345.   LDFLAGS_imdct="${LDFLAGS_imdct} -lm"
  346.   LDFLAGS_imdct3dn="${LDFLAGS_imdct3dn} -lm"
  347.   LDFLAGS_imdctsse="${LDFLAGS_imdctsse} -lm"
  348.   LDFLAGS_i420_rgb="${LDFLAGS_i420_rgb} -lm"
  349.   LDFLAGS_faad="${LDFLAGS_faad} -lm"
  350. )
  351. AC_CHECK_LIB(m,sqrt,
  352.   LDFLAGS_headphone_channel_mixer="${LDFLAGS_headphone_channel_mixer} -lm"
  353. )
  354.  
  355. dnl Check for pthreads - borrowed from XMMS
  356. THREAD_LIB=error
  357. if test "x${THREAD_LIB}" = "xerror"; then
  358.   AC_CHECK_LIB(pthread,main,THREAD_LIB="-lpthread")
  359. fi
  360. if test "x${THREAD_LIB}" = "xerror"; then
  361.   AC_CHECK_LIB(pthreads,main,THREAD_LIB="-lpthreads")
  362. fi
  363. if test "x${THREAD_LIB}" = "xerror"; then
  364.   AC_CHECK_LIB(c_r,main,THREAD_LIB="-lc_r")
  365. fi
  366. if test "x${THREAD_LIB}" = "xerror"; then
  367.   AC_CHECK_FUNCS(pthread_mutex_lock)
  368.   THREAD_LIB=""
  369. fi
  370.  
  371. dnl Check for cthreads under GNU/Hurd for instance
  372. AC_CHECK_LIB(threads,cthread_fork,THREAD_LIB="-lthreads")
  373.  
  374. dnl
  375. dnl  GNU portable threads
  376. dnl
  377. AC_ARG_ENABLE(pth,
  378.   [  --enable-pth            GNU Pth support (default disabled)],
  379.   [ if test "x${enable_pth}" = "xyes"; then
  380.     AC_CHECK_LIB(pth,pth_init)
  381.     AC_MSG_CHECKING(for pth_init in pth.h)
  382.     AC_EGREP_HEADER(pth_init,pth.h,[
  383.       AC_MSG_RESULT(yes)
  384.       AC_DEFINE(PTH_INIT_IN_PTH_H, 1,
  385.                 Define if <pth.h> defines pth_init)
  386.       THREAD_LIB="-lpth"
  387.     ],[
  388.       AC_MSG_RESULT(no)
  389.     ])
  390.     fi
  391. ])
  392.  
  393. dnl
  394. dnl  State Threads
  395. dnl
  396. AC_ARG_ENABLE(st,
  397.   [  --enable-st             State Threads (default disabled)],
  398.   [ if test "x${enable_st}" = "xyes"; then
  399.     AC_CHECK_LIB(st,st_init)
  400.     AC_MSG_CHECKING(for st_init in st.h)
  401.     AC_EGREP_HEADER(st_init,st.h,[
  402.       AC_MSG_RESULT(yes)
  403.       AC_DEFINE(ST_INIT_IN_ST_H, 1,
  404.                 Define if <st.h> defines st_init)
  405.       THREAD_LIB="-lst"
  406.     ],[
  407.       AC_MSG_RESULT(yes)
  408.     ])
  409.     fi
  410. ])
  411.  
  412. if test "x${SYS}" != "xmingw32"; then
  413.   LDFLAGS_vlc="${LDFLAGS_vlc} ${THREAD_LIB}"
  414.   LDFLAGS_plugins="${LDFLAGS_plugins} ${THREAD_LIB}"
  415. fi
  416.  
  417. dnl Don't link with rt when using GNU-pth
  418. if test "x${THREAD_LIB}" != "x-lpth" && test "x${THREAD_LIB}" != "x-lst"; then
  419.   dnl HP/UX port
  420.   AC_CHECK_LIB(rt,sem_init, [LDFLAGS_vlc="${LDFLAGS_vlc} -lrt"])
  421.  
  422.   have_nanosleep=false
  423.   AC_CHECK_FUNCS(nanosleep,have_nanosleep=:,[
  424.     AC_CHECK_LIB(rt,nanosleep,
  425.       [LDFLAGS_vlc="${LDFLAGS_vlc} -lrt"; have_nanosleep=:],
  426.       [AC_CHECK_LIB(posix4,nanosleep,
  427.           [LDFLAGS_vlc="${LDFLAGS_vlc} -lposix4"; have_nanosleep=:])]
  428.     )
  429.   ])
  430.   if ${have_nanosleep}; then
  431.     AC_DEFINE(HAVE_NANOSLEEP, 1,
  432.               Define if nanosleep is available.)
  433.   fi
  434. fi
  435.  
  436. dnl Check for misc headers
  437. AC_MSG_CHECKING(for pthread_cond_t in pthread.h)
  438. AC_EGREP_HEADER(pthread_cond_t,pthread.h,[
  439.   AC_MSG_RESULT(yes)
  440.   AC_DEFINE(PTHREAD_COND_T_IN_PTHREAD_H, 1,
  441.             Define if <pthread.h> defines pthread_cond_t.)],[
  442.   AC_MSG_RESULT(no)])
  443.  
  444. AC_MSG_CHECKING(for pthread_once in pthread.h)
  445. AC_EGREP_HEADER(pthread_once,pthread.h,[
  446.   AC_MSG_RESULT(yes)
  447.   AC_DEFINE(PTHREAD_ONCE_IN_PTHREAD_H, 1,
  448.             Define if <pthread.h> defines pthread_once.)],[
  449.   AC_MSG_RESULT(no)])
  450.  
  451. AC_MSG_CHECKING(for strncasecmp in strings.h)
  452. AC_EGREP_HEADER(strncasecmp,strings.h,[
  453.   AC_MSG_RESULT(yes)
  454.   AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1,
  455.             Define if <strings.h> defines strncasecmp.)],[
  456.   AC_MSG_RESULT(no)])
  457.  
  458. dnl Check for headers
  459. AC_CHECK_HEADERS(signal.h time.h errno.h stdint.h getopt.h strings.h inttypes.h sys/int_types.h)
  460. AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h sys/stat.h)
  461. AC_CHECK_HEADERS(dlfcn.h image.h)
  462. AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
  463. AC_CHECK_HEADERS(machine/param.h sys/shm.h)
  464. AC_CHECK_HEADERS(linux/version.h)
  465.  
  466. AC_HEADER_TIME
  467.  
  468. dnl Check for dirent
  469. need_dirent=false
  470. AC_CHECK_HEADERS(dirent.h,,[need_dirent=:])
  471. AM_CONDITIONAL(BUILD_DIRENT, ${need_dirent})
  472.  
  473. dnl Mac OS X and other OSes don't have declaration for nanosleep
  474. AC_MSG_CHECKING(for nanosleep in time.h)
  475. AC_EGREP_HEADER(nanosleep,time.h,[
  476.   AC_MSG_RESULT(yes)
  477.   AC_DEFINE(HAVE_DECL_NANOSLEEP, 1,
  478.             Define if <time.h> defines nanosleep.)
  479. ],[
  480.   AC_MSG_RESULT(no)
  481. ])
  482.  
  483. dnl Make sure we have timespecs
  484. AC_MSG_CHECKING(for timespec in sys/time.h)
  485. AC_EGREP_HEADER(timespec,sys/time.h,[
  486.   AC_MSG_RESULT(yes)
  487.   AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1,
  488.             Define if <sys/time.h> defines struct timespec.)
  489. ],[
  490.   AC_MSG_RESULT(no)
  491. ])
  492.  
  493. dnl Check for threads library
  494. AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
  495.  
  496. dnl Default X headers and libraries
  497. if test "x${x_includes}" = "xNONE"; then
  498.   x_includes="/usr/X11R6/include"
  499. fi
  500. if test "x${x_libraries}" = "xNONE"; then
  501.   x_libraries="/usr/X11R6/lib"
  502. fi
  503.  
  504. dnl Build the gtk_main plugins?
  505. NEED_GTK_MAIN=no
  506. NEED_GNOME_MAIN=no
  507. NEED_GTK2_MAIN=no
  508. NEED_GNOME2_MAIN=no
  509.  
  510. dnl build the qte plugin ?
  511. NEED_QTE_MAIN=no
  512.  
  513. dnl Check for DPMS
  514. if test "x${SYS}" != "xmingw32"
  515. then
  516.   CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
  517.   AC_CHECK_HEADERS(X11/extensions/dpms.h, [
  518.     AC_MSG_CHECKING(for DPMSInfo in X11/extensions/dpms.h)
  519.     AC_EGREP_HEADER(DPMSInfo,X11/extensions/dpms.h,[
  520.       AC_MSG_RESULT(yes)
  521.       AC_DEFINE(DPMSINFO_IN_DPMS_H, 1,
  522.                 Define if <X11/extensions/dpms.h> defines DPMSInfo.)
  523.     ],[
  524.       AC_MSG_RESULT(no)
  525.     ])
  526.   ],,[
  527.     #include <X11/Xlib.h>
  528.   ])
  529.   CPPFLAGS="${CPPFLAGS_save}"
  530. fi
  531.  
  532. dnl Check for ntohl, etc.
  533. AC_CACHE_CHECK([for ntohl in sys/param.h],
  534.     [ac_cv_c_ntohl_sys_param_h],
  535.     [CFLAGS="${CFLAGS_save} -Wall -Werror"
  536.      AC_TRY_COMPILE([#include <sys/param.h>],
  537.         [void foo() { int meuh; ntohl(meuh); }],
  538.         ac_cv_c_ntohl_sys_param_h=yes, ac_cv_c_ntohl_sys_param_h=no)])
  539. if test "x${ac_cv_c_ntohl_sys_param_h}" != "xno"; then
  540.     AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
  541. fi
  542.  
  543. dnl Check for inline function size limit
  544. AC_CACHE_CHECK([if \$CC accepts -finline-limit],
  545.     [ac_cv_c_inline_limit],
  546.     [CFLAGS="${CFLAGS_save} -finline-limit-30000"
  547.      AC_TRY_COMPILE([],,ac_cv_c_inline_limit=yes, ac_cv_c_inline_limit=no)])
  548. if test "x${ac_cv_c_inline_limit}" != "xno"; then
  549.     CFLAGS_save="${CFLAGS_save} -finline-limit-30000"; CFLAGS="${CFLAGS_save}"
  550.     CXXFLAGS_save="${CXXFLAGS_save} -finline-limit-30000"; CXXFLAGS="${CXXFLAGS_save}"
  551.     OBJCFLAGS_save="${OBJCFLAGS_save} -finline-limit-30000"; OBJCFLAGS="${OBJCFLAGS_save}"
  552. fi
  553.  
  554. # XXX: do this with an M4 macro?
  555. #dnl Check for various -W flags
  556. #for flag in "" all unreachable-code conversion sign-compare disabled-optimization
  557. #do
  558. #    AC_CACHE_CHECK([if \$CC accepts -W${flag}],
  559. #        [ac_cv_c_W${flag}],
  560. #        [CFLAGS="-W${flag} ${CFLAGS_save}"
  561. #         AC_TRY_COMPILE([],,ac_cv_c_W${flag}=yes, ac_cv_c_W${flag}=no)])
  562. #    if test "x${ac_cv_c_W${flag}}" != "xno"; then
  563. #        CFLAGS_save="-W${flag} ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
  564. #        CXXFLAGS_save="-W${flag} ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
  565. #        OBJCFLAGS_save="-W${flag} ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
  566. #    fi
  567. #done
  568.  
  569. AC_CACHE_CHECK([if \$CC accepts -Wall],
  570.     [ac_cv_c_Wall],
  571.     [CFLAGS="-Wall ${CFLAGS_save}"
  572.      AC_TRY_COMPILE([],,ac_cv_c_Wall=yes, ac_cv_c_Wall=no)])
  573.  
  574. AC_CACHE_CHECK([if \$CC accepts -Wconversion],
  575.     [ac_cv_c_Wconversion],
  576.     [CFLAGS="-Wconversion ${CFLAGS_save}"
  577.      AC_TRY_COMPILE([],,ac_cv_c_Wconversion=yes, ac_cv_c_Wconversion=no)])
  578.  
  579. AC_CACHE_CHECK([if \$CC accepts -Wunreachable-code],
  580.     [ac_cv_c_Wunreachable_code],
  581.     [CFLAGS="-Wunreachable-code ${CFLAGS_save}"
  582.      AC_TRY_COMPILE([],,ac_cv_c_Wunreachable_code=yes, ac_cv_c_Wunreachable_code=no)])
  583.  
  584. AC_CACHE_CHECK([if \$CC accepts -Wsign-compare],
  585.     [ac_cv_c_Wsign_compare],
  586.     [CFLAGS="-Wsign-compare ${CFLAGS_save}"
  587.      AC_TRY_COMPILE([],,ac_cv_c_Wsign_compare=yes, ac_cv_c_Wsign_compare=no)])
  588.  
  589. AC_CACHE_CHECK([if \$CC accepts -Wdisabled-optimization],
  590.     [ac_cv_c_Wdisabled_optimization],
  591.     [CFLAGS="-Wdisabled-optimization ${CFLAGS_save}"
  592.      AC_TRY_COMPILE([],,ac_cv_c_Wdisabled_optimization=yes, ac_cv_c_Wdisabled_optimization=no)])
  593.  
  594. AC_CACHE_CHECK([if \$CC accepts -Winline],
  595.     [ac_cv_c_Winline],
  596.     [CFLAGS="-Winline ${CFLAGS_save}"
  597.      AC_TRY_COMPILE([],,ac_cv_c_Winline=yes, ac_cv_c_Winline=no)])
  598.  
  599. if test "x${ac_cv_c_Wall}" != "xno"; then
  600.     CFLAGS_save="-Wall ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
  601.     CXXFLAGS_save="-Wall ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
  602.     OBJCFLAGS_save="-Wall ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
  603. fi
  604.  
  605. if test "x${ac_cv_c_Wunreachable_code}" != "xno"; then
  606. #    CFLAGS_save="-Wunreachable-code ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
  607. #    CXXFLAGS_save="-Wunreachable-code ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
  608. #    OBJCFLAGS_save="-Wunreachable-code ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
  609.  
  610.     dnl -Wunreachable-code means gcc-3.x, we can use -Wconversion and we can
  611.     dnl activate -Winline for C++, it won't choke on system headers.
  612. #    if test "x${ac_cv_c_Wconversion}" != "xno"; then
  613. #        CFLAGS_save="-Wconversion ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
  614. #        CXXFLAGS_save="-Wconversion ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
  615. #        OBJCFLAGS_save="-Wconversion ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
  616. #    fi
  617.     if test "x${ac_cv_c_Winline}" != "xno"; then
  618.         CXXFLAGS_save="-Winline ${CXXFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
  619.     fi
  620.  
  621. fi
  622.  
  623. if test "x${ac_cv_c_Wsign_compare}" != "xno"; then
  624.     CFLAGS_save="-Wsign-compare ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
  625.     CXXFLAGS_save="-Wsign-compare ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
  626.     OBJCFLAGS_save="-Wsign-compare ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
  627. fi
  628.  
  629. if test "x${ac_cv_c_Wdisabled_optimization}" != "xno"; then
  630.     CFLAGS_save="-Wdisabled-optimization ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
  631.     CXXFLAGS_save="-Wdisabled-optimization ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
  632.     OBJCFLAGS_save="-Wdisabled-optimization ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
  633. fi
  634.  
  635. if test "x${ac_cv_c_Winline}" != "xno"; then
  636.     CFLAGS_save="-Winline ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
  637.     OBJCFLAGS_save="-Winline ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
  638. fi
  639.  
  640. dnl Check for -pipe
  641. AC_CACHE_CHECK([if \$CC accepts -pipe],
  642.     [ac_cv_c_pipe],
  643.     [CFLAGS="${CFLAGS_save} -pipe"
  644.      AC_TRY_COMPILE([],,ac_cv_c_pipe=yes, ac_cv_c_pipe=no)])
  645. if test "x${ac_cv_c_pipe}" != "xno"; then
  646.     CFLAGS_save="${CFLAGS_save} -pipe"; CFLAGS="${CFLAGS_save}"
  647.     CXXFLAGS_save="${CXXFLAGS_save} -pipe"; CXXFLAGS="${CXXFLAGS_save}"
  648.     OBJCFLAGS_save="${OBJCFLAGS_save} -pipe"; OBJCFLAGS="${OBJCFLAGS_save}"
  649. fi
  650.  
  651. dnl Check for various optimization flags
  652. AC_CACHE_CHECK([if \$CC accepts -O3],
  653.     [ac_cv_c_o3],
  654.     [CFLAGS="${CFLAGS_save} -O3"
  655.      AC_TRY_COMPILE([],,ac_cv_c_o3=yes, ac_cv_c_o3=no)])
  656. if test "x${ac_cv_c_o3}" != "xno"; then
  657.     CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
  658. fi
  659.  
  660. AC_CACHE_CHECK([if \$CC accepts -O2],
  661.     [ac_cv_c_o2],
  662.     [CFLAGS="${CFLAGS_save} -O2"
  663.      AC_TRY_COMPILE([],,ac_cv_c_o2=yes, ac_cv_c_o2=no)])
  664. if test "x${ac_cv_c_o2}" != "xno"; then
  665.     if test "x${ac_cv_c_o3}" = "xno"; then
  666.         CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
  667.     fi
  668.     CFLAGS_NOOPTIM="${CFLAGS_NOOPTIM} -O2"
  669. else
  670.     AC_CACHE_CHECK([if \$CC accepts -O],
  671.         [ac_cv_c_o],
  672.         [CFLAGS="${CFLAGS_save} -O"
  673.          AC_TRY_COMPILE([],,ac_cv_c_o=yes, ac_cv_c_o=no)])
  674.     if test "x${ac_cv_c_o}" != "xno"; then
  675.         if test "x${ac_cv_c_o3}" = "xno"; then
  676.             CFLAGS_OPTIM="${CFLAGS_OPTIM} -O"
  677.     fi
  678.         CFLAGS_NOOPTIM="${CFLAGS_NOOPTIM} -O"
  679.     fi
  680. fi
  681.  
  682. dnl Check for -ffast-math
  683. AC_CACHE_CHECK([if \$CC accepts -ffast-math],
  684.     [ac_cv_c_fast_math],
  685.     [CFLAGS="${CFLAGS_save} -ffast-math"
  686.      AC_TRY_COMPILE([],,ac_cv_c_fast_math=yes, ac_cv_c_fast_math=no)])
  687. if test "x${ac_cv_c_fast_math}" != "xno"; then
  688.     CFLAGS_OPTIM="${CFLAGS_OPTIM} -ffast-math"
  689. fi
  690.  
  691. dnl Check for -funroll-loops
  692. dnl Disabled on BeOS because BeOS' gcc is buggy and may crash with it
  693. if test "x${SYS}" != "xbeos"
  694. then
  695.   AC_CACHE_CHECK([if \$CC accepts -funroll-loops],
  696.       [ac_cv_c_unroll_loops],
  697.       [CFLAGS="${CFLAGS_save} -funroll-loops"
  698.        AC_TRY_COMPILE([],,ac_cv_c_unroll_loops=yes, ac_cv_c_unroll_loops=no)])
  699.   if test "x${ac_cv_c_unroll_loops}" != "xno"; then
  700.       CFLAGS_OPTIM="${CFLAGS_OPTIM} -funroll-loops"
  701.   fi
  702. fi
  703.  
  704. dnl Check for -fomit-frame-pointer
  705. AC_CACHE_CHECK([if \$CC accepts -fomit-frame-pointer],
  706.     [ac_cv_c_omit_frame_pointer],
  707.     [CFLAGS="${CFLAGS_save} -fomit-frame-pointer"
  708.      AC_TRY_COMPILE([],,ac_cv_c_omit_frame_pointer=yes, ac_cv_c_omit_frame_pointer=no)])
  709. if test "x${ac_cv_c_omit_frame_pointer}" != "xno"; then
  710.     CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
  711.     # this plugin does not compile without -fomit-frame-pointer, damn gcc!
  712.     CFLAGS_i420_yuy2_mmx="${CFLAGS_i420_yuy2_mmx} -fomit-frame-pointer"
  713. fi
  714.  
  715. dnl Check for -mdynamic-no-pic
  716. AC_CACHE_CHECK([if \$CC accepts -mdynamic-no-pic],
  717.     [ac_cv_c_dynamic_no_pic],
  718.     [CFLAGS="${CFLAGS_save} -mdynamic-no-pic"
  719.      AC_TRY_COMPILE([],,ac_cv_c_dynamic_no_pic=yes, ac_cv_c_dynamic_no_pic=no)])
  720. if test "x${ac_cv_c_dynamic_no_pic}" != "xno"; then
  721.     CFLAGS_builtins="${CFLAGS_builtins} -mdynamic-no-pic"
  722.     CFLAGS_libvlc="${CFLAGS_libvlc} -mdynamic-no-pic"
  723. fi
  724.  
  725. dnl Check for Darwin plugin linking flags
  726. AC_CACHE_CHECK([if \$CC accepts -bundle -undefined error -lcc_dynamic],
  727.     [ac_cv_ld_darwin],
  728.     [CFLAGS="${CFLAGS_save} -bundle -undefined error -lcc_dynamic"
  729.      AC_TRY_COMPILE([],,ac_cv_ld_darwin=yes, ac_cv_ld_darwin=no)])
  730. if test "x${ac_cv_ld_darwin}" != "xno"; then
  731.     LDFLAGS_plugins="${LDFLAGS_plugins} -bundle -undefined error -lcc_dynamic"
  732. fi
  733.  
  734. dnl Check for standard plugin linking flags
  735. AC_CACHE_CHECK([if \$CC accepts -shared],
  736.     [ac_cv_ld_plugins],
  737.     [CFLAGS="${CFLAGS_save} -shared"
  738.      AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)])
  739. if test "x${ac_cv_ld_plugins}" != "xno"; then
  740.     LDFLAGS_plugins="${LDFLAGS_plugins} -shared"
  741. fi
  742.  
  743. dnl Check for variadic macros
  744. AC_CACHE_CHECK([for variadic cpp macros],
  745.     [ac_cv_cpp_variadic_macros],
  746.     [CFLAGS="${CFLAGS_save}"
  747.      AC_TRY_COMPILE(
  748.          [#include <stdio.h>
  749.           #define a(b,c...) printf(b,##c)],
  750.          [a("foo");a("%s","bar");a("%s%s","baz","quux");],
  751.          ac_cv_cpp_variadic_macros=yes,
  752.          ac_cv_cpp_variadic_macros=no)])
  753. if test "x${ac_cv_cpp_variadic_macros}" != "xno"; then
  754.     AC_DEFINE(HAVE_VARIADIC_MACROS, 1, Support for variadic macros)
  755. fi
  756.  
  757. dnl Checks for __attribute__(aligned()) directive
  758. AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
  759.     [ac_cv_c_attribute_aligned],
  760.     [ac_cv_c_attribute_aligned=0
  761.         CFLAGS="${CFLAGS_save} -Werror"
  762.     for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
  763.         AC_TRY_COMPILE([],
  764.         [static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;],
  765.         [ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"])
  766.     done
  767.         CFLAGS="${CFLAGS_save}"])
  768. if test "x${ac_cv_c_attribute_aligned}" != "x0"; then
  769.     AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
  770.         [${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
  771. fi
  772.  
  773. dnl Checks for __attribute__(format()) directive
  774. AC_CACHE_CHECK([__attribute__ ((format ())) support with function pointers],
  775.     [ac_cv_c_attribute_format],
  776.     [ac_cv_c_attribute_format=no
  777.         CFLAGS="${CFLAGS_save} -Werror"
  778.         AC_TRY_COMPILE([],
  779.         [static void (*pf_printf)(const char *, ...) __attribute__ ((format(printf,1,2)));(void)pf_printf;],
  780.         [ac_cv_c_attribute_format=yes])
  781.         CFLAGS="${CFLAGS_save}"])
  782. if test "x${ac_cv_c_attribute_format}" != "xno"; then
  783.     AC_DEFINE(HAVE_ATTRIBUTE_FORMAT, 1, Support for __attribute__((format())) with function pointers)
  784. fi
  785.  
  786. dnl
  787. dnl  Check the CPU
  788. dnl
  789. case "x${target_cpu}" in
  790.   x)
  791.     ARCH=unknown
  792.     ;;
  793.   *)
  794.     ARCH="${target_cpu}"
  795.     ;;
  796. esac
  797.  
  798. case "${ARCH}" in
  799.   hppa64)
  800.     CFLAGS_mpeg_video="${CFLAGS_mpeg_video} -ffunction-sections"
  801.     ;;
  802. esac
  803.  
  804. dnl
  805. dnl  Enable profiling
  806. dnl
  807. AC_ARG_ENABLE(gprof,
  808. [  --enable-gprof          gprof profiling (default disabled)])
  809. AC_ARG_ENABLE(cprof,
  810. [  --enable-cprof          cprof profiling (default disabled)])
  811. AM_CONDITIONAL(GPROF, test "${enable_gprof}" = "yes")
  812. AM_CONDITIONAL(CPROF, test "${enable_gprof}" = "yes")
  813.  
  814. dnl
  815. dnl  default modules
  816. dnl
  817. BUILTINS="${BUILTINS} mpeg_video idct idctclassic motion"
  818. PLUGINS="${PLUGINS} dummy rc logger gestures memcpy"
  819. PLUGINS="${PLUGINS} es audio m4v mpeg_system ps ts avi asf aac mp4 rawdv"
  820. PLUGINS="${PLUGINS} spudec mpeg_audio lpcm a52 dts cinepak"
  821. PLUGINS="${PLUGINS} deinterlace invert adjust wall transform distort clone crop motionblur"
  822. PLUGINS="${PLUGINS} float32tos16 float32tos8 float32tou16 float32tou8 a52tospdif dtstospdif fixed32tofloat32 fixed32tos16 s16tofixed32 s16tofloat32 s16tofloat32swab s8tofloat32 u8tofixed32 u8tofloat32"
  823. PLUGINS="${PLUGINS} trivial_resampler ugly_resampler linear_resampler bandlimited_resampler"
  824. PLUGINS="${PLUGINS} trivial_channel_mixer headphone_channel_mixer"
  825. PLUGINS="${PLUGINS} trivial_mixer spdif_mixer float32_mixer"
  826. PLUGINS="${PLUGINS} aout_file"
  827. #PLUGINS="${PLUGINS} scope"
  828. PLUGINS="${PLUGINS} i420_rgb i420_yuy2 i422_yuy2 i420_ymga"
  829. PLUGINS="${PLUGINS} id3 m3u"
  830. PLUGINS="${PLUGINS} rawvideo"
  831. PLUGINS="${PLUGINS} wav araw demuxdump demuxsub adpcm a52sys au"
  832. PLUGINS="${PLUGINS} access_file access_udp access_http ipv4 access_mms"
  833. PLUGINS="${PLUGINS} access_ftp access_directory sap httpd"
  834.  
  835. dnl
  836. dnl Some plugins aren't useful on some platforms
  837. dnl
  838. if test "x${SYS}" != "xmingw32"; then
  839.     PLUGINS="${PLUGINS} screensaver"
  840. fi
  841.  
  842. dnl
  843. dnl  Accelerated modules
  844. dnl
  845. MMX_MODULES="memcpymmx idctmmx motionmmx i420_rgb_mmx i422_yuy2_mmx i420_ymga_mmx"
  846. MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
  847. THREEDNOW_MODULES="memcpy3dn"
  848. SSE_MODULES=""
  849. ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec"
  850.  
  851. if test "${enable_gprof}" != "yes"
  852. then
  853.   MMX_MODULES="${MMX_MODULES} i420_yuy2_mmx"
  854. fi
  855.  
  856. AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
  857.     [ac_cv_mmx_inline],
  858.     [CFLAGS="${CFLAGS_save}"
  859.      AC_TRY_COMPILE(,[void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));],
  860.                     ac_cv_mmx_inline=yes, ac_cv_mmx_inline=no)])
  861. if test "x${ac_cv_mmx_inline}" != "xno"; then
  862.   ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
  863. fi
  864.  
  865. AC_CACHE_CHECK([if \$CC groks MMX EXT inline assembly],
  866.     [ac_cv_mmxext_inline],
  867.     [CFLAGS="${CFLAGS_save}"
  868.      AC_TRY_COMPILE(,[void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));],
  869.                     ac_cv_mmxext_inline=yes, ac_cv_mmxext_inline=no)])
  870. if test "x${ac_cv_mmxext_inline}" != "xno"; then
  871.   ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
  872. fi
  873.  
  874. AC_CACHE_CHECK([if \$CC groks 3D Now! inline assembly],
  875.     [ac_cv_3dnow_inline],
  876.     [CFLAGS="${CFLAGS_save}"
  877.      AC_TRY_COMPILE(,[void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));],
  878.                     ac_cv_3dnow_inline=yes, ac_cv_3dnow_inline=no)])
  879. if test "x${ac_cv_3dnow_inline}" != "xno"; then
  880.   AC_DEFINE(CAN_COMPILE_3DNOW, 1, Define if \$CC groks 3D Now! inline assembly.)
  881.   ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
  882. fi
  883.  
  884. AC_CACHE_CHECK([if \$CC groks SSE inline assembly],
  885.     [ac_cv_sse_inline],
  886.     [CFLAGS="${CFLAGS_save}"
  887.      AC_TRY_COMPILE(,[void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));],
  888.                     ac_cv_sse_inline=yes, ac_cv_sse_inline=no)])
  889. if test "x${ac_cv_sse_inline}" != "xno" -a "x${SYS}" != "xmingw32"; then
  890.   AC_DEFINE(CAN_COMPILE_SSE, 1, Define if \$CC groks SSE inline assembly.)
  891.   ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
  892. fi
  893.  
  894. # don't try to grok AltiVec with native mingw32 it doesn't work right now
  895. # we should be able to remove this test with future versions of mingw32
  896. if test "x${SYS}" != "xmingw32"; then
  897. AC_CACHE_CHECK([if \$CC groks AltiVec inline assembly],
  898.     [ac_cv_altivec_inline],
  899.     [CFLAGS="${CFLAGS_save}"
  900.      AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
  901.          ac_cv_altivec_inline=yes,
  902.          [CFLAGS="${CFLAGS_save} -Wa,-m7400"
  903.           AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
  904.             [ac_cv_altivec_inline="-Wa,-m7400"],
  905.             ac_cv_altivec_inline=no)
  906.          ])])
  907. if test "x${ac_cv_altivec_inline}" != "xno"; then
  908.   AC_DEFINE(CAN_COMPILE_ALTIVEC, 1, Define if \$CC groks AltiVec inline assembly.)
  909.   if test "x${ac_cv_altivec_inline}" != "xyes"; then
  910.     CFLAGS_idctaltivec="${CFLAGS_idctaltivec} ${ac_cv_altivec_inline}"
  911.     CFLAGS_motionaltivec="${CFLAGS_motionaltivec} ${ac_cv_altivec_inline}"
  912.     CFLAGS_memcpyaltivec="${CFLAGS_memcpyaltivec} ${ac_cv_altivec_inline}"
  913.     CFLAGS_vlc="${CFLAGS_vlc} ${ac_cv_altivec_inline}"
  914.   fi
  915.   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
  916. fi
  917.  
  918. AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
  919.     [ac_cv_c_altivec],
  920.     [CFLAGS="${CFLAGS_save} -faltivec"
  921.      # Darwin test
  922.      AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
  923.         ac_cv_c_altivec=-faltivec, [
  924.         # Linux/PPC test
  925.         CFLAGS="${CFLAGS_save} ${CFLAGS_idctaltivec} -fvec"
  926.         AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
  927.             [ac_cv_c_altivec="-fvec"], ac_cv_c_altivec=no)
  928.         ])
  929.      CFLAGS="${CFLAGS_save}"])
  930. if test "x${ac_cv_c_altivec}" != "xno"; then
  931.   AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.)
  932.   CFLAGS_idctaltivec="${CFLAGS_idctaltivec} ${ac_cv_c_altivec}"
  933.   CFLAGS_motionaltivec="${CFLAGS_motionaltivec} ${ac_cv_c_altivec}"
  934.   CFLAGS_memcpyaltivec="${CFLAGS_memcpyaltivec} ${ac_cv_c_altivec}"
  935.   CFLAGS_vlc="${CFLAGS_vlc} ${ac_cv_c_altivec}"
  936.   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
  937. fi
  938.  
  939. AC_CACHE_CHECK([if linker needs -framework vecLib],
  940.     [ac_cv_ld_altivec],
  941.     [LDFLAGS="${LDFLAGS_vlc} -framework vecLib"
  942.      AC_TRY_LINK([],,ac_cv_ld_altivec=yes,ac_cv_ld_altivec=no)
  943.      LDFLAGS="${LDFLAGS_save}"
  944.     ])
  945. if test "x${ac_cv_ld_altivec}" != "xno"; then
  946.   LDFLAGS_idctaltivec="${LDFLAGS_idctaltivec} -framework vecLib"
  947.   LDFLAGS_motionaltivec="${LDFLAGS_motionaltivec} -framework vecLib"
  948.   LDFLAGS_memcpyaltivec="${LDFLAGS_memcpyaltivec} -framework vecLib"
  949.   LDFLAGS_vlc="${LDFLAGS_vlc} -framework vecLib"
  950. fi
  951. fi # end if mingw32
  952.  
  953. AC_ARG_WITH(,[])
  954. AC_ARG_WITH(,[Optimization options:])
  955.  
  956. dnl
  957. dnl  Special arch tuning
  958. dnl
  959. AC_ARG_WITH(tuning,
  960. [  --with-tuning=ARCH      enable special tuning for an architecture
  961.                           (default i686 on IA-32 and 750 on PPC)])
  962. if test "x${with_tuning}" != "x"; then
  963.     if test "x${target_cpu}" = "xpowerpc"; then
  964.         CFLAGS_TUNING="-mtune=${with_tuning}"
  965.     else
  966.         CFLAGS_TUNING="-mcpu=${with_tuning}"
  967.     fi
  968. else
  969.     if test "x${target_cpu}" = "xi686" -o "x${target_cpu}" = "xi586" -o "x${target_cpu}" = "xi486" -o "x${target_cpu}" = "xi386"; then CFLAGS_TUNING="-mcpu=pentiumpro"
  970.     else
  971.         if test "x${target_cpu}" = "xpowerpc"; then CFLAGS_TUNING="-mtune=750"; fi
  972.     fi
  973. fi
  974.  
  975. dnl
  976. dnl  x86 accelerations
  977. dnl
  978. if test "x${target_cpu}" = "xi686" -o "x${target_cpu}" = "xi586" -o "x${target_cpu}" = "xx86" -o "x${target_cpu}" = "xi386"
  979. then
  980.     ARCH="${ARCH} mmx"
  981.     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"
  982. fi
  983.  
  984. dnl
  985. dnl  Enable/disable optimizations
  986. dnl
  987. AC_ARG_ENABLE(optimizations,
  988. [  --disable-optimizations disable compiler optimizations (default enabled)])
  989. AM_CONDITIONAL(OPTIM, test "x${enable_optimizations}" != "xno")
  990.  
  991. dnl
  992. dnl  AltiVec acceleration
  993. dnl
  994. AC_ARG_ENABLE(altivec,
  995. [  --disable-altivec       disable AltiVec optimizations (default enabled on PPC)],
  996. [ if test "x${enable_altivec}" = "xyes"; then ARCH="${ARCH} altivec";
  997.     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ],
  998. [ if test "x${target_cpu}" = "xpowerpc"; then ARCH="${ARCH} altivec";
  999.     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ])
  1000.  
  1001. dnl
  1002. dnl  Debugging mode
  1003. dnl
  1004. AC_ARG_ENABLE(debug,
  1005. [  --enable-debug          debug mode (default disabled)])
  1006. AM_CONDITIONAL(DEBUG, test "x${enable_debug}" = "xyes")
  1007.  
  1008. dnl
  1009. dnl  Enable release-specific flags
  1010. dnl
  1011. AC_ARG_ENABLE(release,
  1012. [  --enable-release        activate extra optimizations (default disabled)])
  1013. AM_CONDITIONAL(RELEASE, test "x${enable_release}" = "xyes")
  1014.  
  1015. dnl
  1016. dnl Stream output
  1017. dnl
  1018. AC_ARG_ENABLE(sout,
  1019.   [  --enable-sout           Stream output modules (default enabled)])
  1020. if test "x${enable_sout}" != "xno"
  1021. then
  1022.   PLUGINS="${PLUGINS} access_output_dummy access_output_udp access_output_file access_output_http"
  1023.   PLUGINS="${PLUGINS} mux_ts mux_ps mux_avi mux_dummy"
  1024.   PLUGINS="${PLUGINS} packetizer_mpegaudio packetizer_mpegvideo packetizer_a52"
  1025.   PLUGINS="${PLUGINS} packetizer_mpeg4video packetizer_mpeg4audio"
  1026.   PLUGINS="${PLUGINS} packetizer_copy"
  1027.  
  1028.   PLUGINS="${PLUGINS} vout_encoder"
  1029.  
  1030.     dnl Ogg/ogm
  1031.     AC_CHECK_HEADERS(ogg/ogg.h, [
  1032.       AC_CHECK_LIB( ogg, ogg_stream_packetin, [
  1033.         PLUGINS="${PLUGINS} mux_ogg"
  1034.         LDFLAGS_mux_ogg="${LDFLAGS_mux_ogg} -logg" ])
  1035.     ],[])
  1036. fi
  1037.  
  1038.  
  1039. dnl
  1040. dnl  Input plugins
  1041. dnl
  1042.  
  1043. AC_ARG_WITH(,[Input plugins:])
  1044.  
  1045. dnl
  1046. dnl  DVD module: optionally check for installed libdvdcss
  1047. dnl
  1048. AC_ARG_ENABLE(dvd,
  1049. [  --enable-dvd            DVD input module (default enabled)])
  1050. if test "x${enable_dvd}" != "xno"
  1051. then
  1052.   AC_ARG_WITH(dvdcss,
  1053.   [    --with-dvdcss=PATH    libdvdcss headers and libraries])
  1054.   AC_ARG_WITH(dvdcss-tree,
  1055.   [    --with-dvdcss-tree=PATH libdvdcss tree for static linking])
  1056.   case "x${with_dvdcss}" in
  1057.   x|xyes)
  1058.     if test "x${with_dvdcss_tree}" = x
  1059.     then
  1060.       AC_CHECK_HEADERS(dvdcss/dvdcss.h,
  1061.         [ PLUGINS="${PLUGINS} dvd"
  1062.           LDFLAGS_dvd="${LDFLAGS_dvd} -ldvdcss"
  1063.           LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -ldvdcss" ],
  1064.         [ AC_MSG_WARN([libdvdcss is no longer provided with vlc; please get libdvdcss from http://www.videolan.org/libdvdcss/ and build it. Then either use --with-dvdcss=<path/where/libdvdcss/was/installed> for dynamic linking (recommended under Unix) or --with-dvdcss-tree=<path/where/libdvdcss/was/built> for static linking (recommended under BeOS, Windows, MacOS X). Alternatively you can use --disable-dvd to disable the DVD plugin.])
  1065.           AC_MSG_ERROR([cannot find libdvdcss headers]) ])
  1066.     else
  1067.       AC_MSG_CHECKING(for libdvdcss.a in ${with_dvdcss_tree})
  1068.       real_dvdcss_tree="`cd ${with_dvdcss_tree} 2>/dev/null && pwd`"
  1069.       if test "x${real_dvdcss_tree}" = "x"
  1070.       then
  1071.         dnl  The given directory can't be found
  1072.         AC_MSG_RESULT(no)
  1073.         AC_MSG_ERROR([cannot cd to ${with_dvdcss_tree}])
  1074.       fi
  1075.       if test -f "${real_dvdcss_tree}/src/.libs/libdvdcss.a"
  1076.       then
  1077.         dnl  Use a custom libdvdcss
  1078.         AC_MSG_RESULT(${real_dvdcss_tree}/src/.libs/libdvdcss.a)
  1079.         BUILTINS="${BUILTINS} dvd"
  1080.         LDFLAGS_dvd="${LDFLAGS_dvd} -L${real_dvdcss_tree}/src/.libs -ldvdcss"
  1081.         LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -L${real_dvdcss_tree}/src/.libs -ldvdcss"
  1082.         CPPFLAGS_dvd="${CPPFLAGS_dvd} -I${real_dvdcss_tree}/src"
  1083.       else
  1084.         dnl  The given libdvdcss wasn't built
  1085.         AC_MSG_RESULT(no)
  1086.         AC_MSG_ERROR([cannot find ${real_dvdcss_tree}/src/.libs/libdvdcss.a, make sure you compiled libdvdcss in ${with_dvdcss_tree}])
  1087.       fi
  1088.     fi
  1089.   ;;
  1090.   xno)
  1091.     dnl  Compile without dvdcss (dlopen version, works only under Linux)
  1092.     PLUGINS="${PLUGINS} dvd"
  1093.     CPPFLAGS_dvd="${CPPFLAGS_dvd} -DGOD_DAMN_DMCA"
  1094.     LDFLAGS_dvd="${LDFLAGS_dvd} -ldl"
  1095.   ;;
  1096.   *)
  1097.     AC_MSG_CHECKING(for dvdcss headers in ${with_dvdcss})
  1098.     if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
  1099.     then
  1100.       dnl  Use ${with_dvdcss}/include/dvdcss/dvdcss.h
  1101.       AC_MSG_RESULT(yes)
  1102.       PLUGINS="${PLUGINS} dvd"
  1103.       LDFLAGS_dvd="${LDFLAGS_dvd} -L${with_dvdcss}/lib -ldvdcss"
  1104.       LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -L${with_dvdcss}/lib -ldvdcss"
  1105.       CPPFLAGS_dvd="${CPPFLAGS_dvd} -I${with_dvdcss}/include"
  1106.     else
  1107.       dnl  No libdvdcss could be found, sorry
  1108.       AC_MSG_RESULT(no)
  1109.       AC_MSG_ERROR([cannot find ${with_dvdcss}/include/dvdcss/dvdcss.h])
  1110.     fi
  1111.   ;;
  1112.   esac
  1113. fi
  1114.  
  1115. dnl
  1116. dnl dvdread module: check for libdvdread
  1117. dnl
  1118. AC_ARG_ENABLE(dvdread,
  1119. [  --enable-dvdread        dvdread input module (default disabled)])
  1120. if test "x${enable_dvdread}" != "xno"
  1121. then
  1122.   AC_ARG_WITH(dvdread,
  1123.   [    --with-dvdread=PATH    libdvdread headers and libraries])
  1124.   AC_ARG_WITH(dvdread-tree,
  1125.   [    --with-dvdread-tree=PATH libdvdread tree for static linking])
  1126.   if test "x${with_dvdread}" = x
  1127.   then
  1128.     if test "x${with_dvdread_tree}" = x
  1129.     then
  1130.       AC_CHECK_HEADERS(dvdread/dvd_reader.h,
  1131.         [ PLUGINS="${PLUGINS} dvdread"
  1132.           LDFLAGS_dvdread="${LDFLAGS_dvdread} -ldvdread ${LDFLAGS_dvdcss}" ],
  1133.         [ if test "x${enable_dvdread}" != "x"
  1134.           then
  1135.             AC_MSG_WARN([Please get libdvdread from http://www.dtek.chalmers.se/groups/dvd/downloads.shtml])
  1136.             AC_MSG_ERROR([cannot find libdvdread headers])
  1137.           fi ])
  1138.     else
  1139.       AC_MSG_CHECKING(for libdvdread.a in ${with_dvdread_tree})
  1140.       real_dvdread_tree="`cd ${with_dvdread_tree} 2>/dev/null && pwd`"
  1141.       if test "x${real_dvdread_tree}" = "x"
  1142.       then
  1143.         dnl  The given directory can't be found
  1144.         AC_MSG_RESULT(no)
  1145.         AC_MSG_ERROR([cannot cd to ${with_dvdread_tree}])
  1146.       fi
  1147.       if test -f "${real_dvdread_tree}/dvdread/.libs/libdvdread.a"
  1148.       then
  1149.         dnl  Use a custom libdvdread
  1150.         AC_MSG_RESULT(${real_dvdread_tree}/dvdread/.libs/libdvdread.a)
  1151.         BUILTINS="${BUILTINS} dvdread"
  1152.         LDFLAGS_dvdread="${LDFLAGS_dvdread} -L${real_dvdread_tree}/dvdread/.libs -ldvdread ${LDFLAGS_dvdcss}"
  1153.         CPPFLAGS_dvdread="${CPPFLAGS_dvdread} -I${real_dvdread_tree}"
  1154.       else
  1155.         dnl  The given libdvdread wasn't built
  1156.         AC_MSG_RESULT(no)
  1157.         AC_MSG_ERROR([cannot find ${real_dvdread_tree}/dvdread/.libs/libdvdread.a, make sure you compiled libdvdread in ${with_dvdread_tree}])
  1158.       fi
  1159.     fi
  1160.   else
  1161.     AC_MSG_CHECKING(for dvdread headers in ${with_dvdread})
  1162.     if test -f ${with_dvdread}/include/dvdread/dvd_reader.h
  1163.     then
  1164.       dnl  Use ${with_dvdread}/include/dvdread/dvd_reader.h
  1165.       AC_MSG_RESULT(yes)
  1166.       PLUGINS="${PLUGINS} dvdread"
  1167.       LDFLAGS_dvdread="${LDFLAGS_dvdread} -L${with_dvdread}/lib -ldvdread ${LDFLAGS_dvdcss}"
  1168.       CPPFLAGS_dvdread="${CPPFLAGS_dvdread} -I${with_dvdread}/include"
  1169.     else
  1170.       dnl  No libdvdread could be found, sorry
  1171.       AC_MSG_RESULT(no)
  1172.       AC_MSG_ERROR([cannot find ${with_dvdread}/include/dvdread/dvd_reader.h])
  1173.     fi
  1174.   fi
  1175. fi
  1176.  
  1177. dnl
  1178. dnl dvdplay module: check for libdvdplay
  1179. dnl
  1180. AC_ARG_ENABLE(dvdplay,
  1181. [  --enable-dvdplay        dvdplay input module (default disabled)])
  1182. if test "x${enable_dvdplay}" != "xno"
  1183. then
  1184.   AC_ARG_WITH(dvdplay,
  1185.   [    --with-dvdplay=PATH    libdvdplay headers and libraries])
  1186.   AC_ARG_WITH(dvdplay-tree,
  1187.   [    --with-dvdplay-tree=PATH libdvdplay tree for static linking])
  1188.   if test "x${with_dvdplay}" = x
  1189.   then
  1190.     if test "x${with_dvdplay_tree}" = x
  1191.     then
  1192.       AC_CHECK_HEADERS(dvdplay/dvdplay.h,
  1193.         [ PLUGINS="${PLUGINS} dvdplay"
  1194.           LDFLAGS_dvdplay="${LDFLAGS_dvdplay} -ldvdplay ${LDFLAGS_dvdread} ${LDFLAGS_dvdcss}"
  1195.           CPPFLAGS_dvdplay="${CPPFLAGS_dvdplay} ${CPPFLAGS_dvdread}" ],
  1196.         [ if test "x${enable_dvdplay}" != "x"
  1197.           then
  1198.             AC_MSG_WARN([Please get libdvdplay from http://www.videolan.org/.])
  1199.             AC_MSG_ERROR([cannot find libdvdplay headers])
  1200.           fi ])
  1201.     else
  1202.       AC_MSG_CHECKING(for libdvdplay.a in ${with_dvdplay_tree})
  1203.       real_dvdplay_tree="`cd ${with_dvdplay_tree} 2>/dev/null && pwd`"
  1204.       if test "x${real_dvdplay_tree}" = "x"
  1205.       then
  1206.         dnl  The given directory can't be found
  1207.         AC_MSG_RESULT(no)
  1208.         AC_MSG_ERROR([cannot cd to ${with_dvdplay_tree}])
  1209.       fi
  1210.       if test -f "${real_dvdplay_tree}/src/.libs/libdvdplay.a"
  1211.       then
  1212.         dnl  Use a custom libdvdplay
  1213.         AC_MSG_RESULT(${real_dvdplay_tree}/src/.libs/libdvdplay.a)
  1214.         BUILTINS="${BUILTINS} dvdplay"
  1215.         LDFLAGS_dvdplay="${LDFLAGS_dvdplay} -L${real_dvdplay_tree}/src/.libs -ldvdplay ${LDFLAGS_dvdread} ${LDFLAGS_dvdcss}"
  1216.         CPPFLAGS_dvdplay="${CPPFLAGS_dvdplay} ${CPPFLAGS_dvdread} -I${real_dvdplay_tree}/src"
  1217.       else
  1218.         dnl  The given libdvdplay wasn't built
  1219.         AC_MSG_RESULT(no)
  1220.         AC_MSG_ERROR([cannot find ${real_dvdplay_tree}/src/.libs/libdvdplay.a, make sure you compiled libdvdplay in ${with_dvdplay_tree}])
  1221.       fi
  1222.     fi
  1223.   else
  1224.     AC_MSG_CHECKING(for dvdplay headers in ${with_dvdplay})
  1225.     if test -f ${with_dvdplay}/include/dvdplay/dvdplay.h
  1226.     then
  1227.       dnl  Use ${with_dvdplay}/include/dvdplay/dvdplay.h
  1228.       AC_MSG_RESULT(yes)
  1229.       PLUGINS="${PLUGINS} dvdplay"
  1230.       LDFLAGS_dvdplay="${LDFLAGS_dvdplay} -L${with_dvdplay}/lib -ldvdplay ${LDFLAGS_dvdread} ${LDFLAGS_dvdcss}"
  1231.       CPPFLAGS_dvdplay="${CPPFLAGS_dvdplay} ${CPPFLAGS_dvdread} -I${with_dvdplay}/include"
  1232.     else
  1233.       dnl  No libdvdplay could be found, sorry
  1234.       AC_MSG_RESULT(no)
  1235.       AC_MSG_ERROR([cannot find ${with_dvdplay}/include/dvdplay/dvdplay.h])
  1236.     fi
  1237.   fi
  1238. fi
  1239.  
  1240. dnl
  1241. dnl  libdvbpsi ts demux/mux
  1242. dnl
  1243. AC_ARG_ENABLE(dvbpsi,
  1244. [  --enable-dvbpsi         dvbpsi ts mux and demux module (default enabled)])
  1245. if test "x${enable_dvbpsi}" != "xno"
  1246. then
  1247.   AC_ARG_WITH(dvbpsi,
  1248.   [    --with-dvbpsi=PATH    libdvbpsi headers and libraries])
  1249.   AC_ARG_WITH(dvbpsi,
  1250.   [    --with-dvbpsi-tree=PATH libdvbpsi tree for static linking])
  1251.   case "x${with_dvbpsi}" in
  1252.   x|xyes)
  1253.     if test "x${with_dvbpsi_tree}" = "x"
  1254.     then
  1255.       AC_CHECK_HEADERS(dvbpsi/dr.h,
  1256.         [ PLUGINS="${PLUGINS} ts_dvbpsi"
  1257.           LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} -ldvbpsi" 
  1258.           PLUGINS="${PLUGINS} mux_ts_dvbpsi"
  1259.           LDFLAGS_mux_ts_dvbpsi="${LDFLAGS_mux_ts_dvbpsi} -ldvbpsi" ],
  1260.         [  AC_MSG_WARN([cannot find libdvbpsi headers]) ],
  1261.         [#include <stdint.h>
  1262. #include <dvbpsi/dvbpsi.h>
  1263. #include <dvbpsi/descriptor.h>
  1264. #include <dvbpsi/pat.h>
  1265. #include <dvbpsi/pmt.h>])
  1266.     else
  1267.       AC_MSG_CHECKING(for libdvbpsi.a in ${with_dvbpsi_tree})
  1268.       real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
  1269.       if test "x${real_dvbpsi_tree}" = "x"
  1270.       then
  1271.         dnl  The given directory can't be found
  1272.         AC_MSG_RESULT(no)
  1273.         AC_MSG_ERROR([cannot cd to ${with_dvbpsi_tree}])
  1274.       fi
  1275.       if test -f "${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
  1276.       then
  1277.         dnl  Use a custom libdvbpsi
  1278.         AC_MSG_RESULT(${real_dvbpsi_tree}/src/.libs/libdvbpsi.a)
  1279.         BUILTINS="${BUILTINS} ts_dvbpsi"
  1280.         LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} -L${real_dvbpsi_tree}/src/.libs -ldvbpsi"
  1281.         CPPFLAGS_ts_dvbpsi="${CPPFLAGS_ts_dvbpsi} -I${real_dvbpsi_tree}/src"
  1282.  
  1283.         BUILTINS="${BUILTINS} mux_ts_dvbpsi"
  1284.         LDFLAGS_mux_ts_dvbpsi="${LDFLAGS_mux_ts_dvbpsi} -L${real_dvbpsi_tree}/src/.libs -ldvbpsi"
  1285.         CPPFLAGS_mux_ts_dvbpsi="${CPPFLAGS_mux_ts_dvbpsi} -I${real_dvbpsi_tree}/src"
  1286.  
  1287.       else
  1288.         dnl  The given libdvbpsi wasn't built
  1289.         AC_MSG_RESULT(no)
  1290.         AC_MSG_ERROR([cannot find ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a, make sure you compiled libdvbpsi in ${with_dvbpsi_tree}])
  1291.       fi
  1292.     fi
  1293.   ;;
  1294.   xno)
  1295.     dnl  Compile without dvbpsi
  1296.   ;;
  1297.   *)
  1298.     AC_MSG_CHECKING(for dvbpsi headers in ${with_dvbpsi})
  1299.     if test "x${with_dvbpsi}" = "x"
  1300.     then
  1301.       LDFLAGS_test=""
  1302.       CPPFLAGS_test=""
  1303.     else
  1304.       LDFLAGS_test="-L${with_dvbpsi}/lib"
  1305.       CPPFLAGS_test="-I${with_dvbpsi}/include"
  1306.     fi
  1307.     CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
  1308.     AC_CHECK_HEADER([dvbpsi/dr.h],[
  1309.       PLUGINS="${PLUGINS} ts_dvbpsi"
  1310.       LDFLAGS_ts_dvbpsi="${LDFLAGS_ts_dvbpsi} ${LDFLAGS_test} -ldvbpsi"
  1311.       CPPFLAGS_ts_dvbpsi="${CPPFLAGS_ts_dvbpsi} ${CPPFLAGS_test}"
  1312.       PLUGINS="${PLUGINS} mux_ts_dvbpsi"
  1313.       LDFLAGS_mux_ts_dvbpsi="${LDFLAGS_mux_ts_dvbpsi} ${LDFLAGS_test} -ldvbpsi"
  1314.       CPPFLAGS_mux_ts_dvbpsi="${CPPFLAGS_mux_ts_dvbpsi} ${CPPFLAGS_test}"
  1315.  
  1316.       ],[
  1317.       if test "x${enable_dvbpsi}" != "x"
  1318.       then
  1319.         AC_MSG_ERROR([Could not find libdvbpsi on your system: you may get it from www.videolan.org, you'll need at least version 0.1.1])
  1320.       fi
  1321.     ])
  1322.     CPPFLAGS="${CPPFLAGS_save}"
  1323.   ;;
  1324.   esac
  1325. fi
  1326.  
  1327. dnl
  1328. dnl  Video4Linux plugin
  1329. dnl
  1330. AC_ARG_ENABLE(v4l,
  1331.   [  --enable-v4l            Video4Linux input support (default disabled)])
  1332. if test "x${enable_v4l}" = "xyes"
  1333. then
  1334.   AC_CHECK_HEADERS(libv4l/v4l.h, [
  1335.     PLUGINS="${PLUGINS} v4l"
  1336.    ],[])
  1337. fi
  1338.  
  1339. dnl
  1340. dnl  VCD module
  1341. dnl
  1342. AC_ARG_ENABLE(vcd,
  1343.   [  --enable-vcd            VCD support for Linux, FreeBSD, MacOS X and Win32 (default enabled)])
  1344.  
  1345. if test "x${enable_vcd}" != "xno"
  1346. then
  1347.   AC_MSG_CHECKING(for cdrom_msf0 in linux/cdrom.h)
  1348.   AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[
  1349.     AC_MSG_RESULT(yes)
  1350.     PLUGINS="${PLUGINS} vcd"
  1351.   ],[
  1352.     AC_MSG_RESULT(no)
  1353.   ])
  1354.  
  1355.   AC_MSG_CHECKING(for scsireq in sys/scsiio.h)
  1356.   AC_EGREP_HEADER(scsireq,sys/scsiio.h,[
  1357.     AC_MSG_RESULT(yes)
  1358.     PLUGINS="${PLUGINS} vcd"
  1359.     AC_DEFINE(HAVE_SCSIREQ_IN_SYS_SCSIIO_H, 1, For NetBSD VCD support)
  1360.   ],[
  1361.     AC_MSG_RESULT(no)
  1362.   ])
  1363.  
  1364.   AC_MSG_CHECKING(for ioc_toc_header in sys/cdio.h)
  1365.   AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[
  1366.     AC_MSG_RESULT(yes)
  1367.     PLUGINS="${PLUGINS} vcd"
  1368.     AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support)
  1369.   ],[
  1370.     AC_MSG_RESULT(no)
  1371.   ])
  1372.  
  1373.   if test "x${SYS}" = "xbsdi" -o "x${SYS}" = "xmingw32"
  1374.   then
  1375.     PLUGINS="${PLUGINS} vcd"
  1376.   fi
  1377.  
  1378.   if test "x${SYS}" = "xdarwin"
  1379.   then
  1380.     PLUGINS="${PLUGINS} vcd"
  1381.     LDFLAGS_vcd="${LDFLAGS_vcd} -framework IOKit -framework CoreFoundation"
  1382.   fi
  1383. fi
  1384.  
  1385. dnl
  1386. dnl  Satellite input module
  1387. dnl
  1388. AC_ARG_ENABLE(satellite,
  1389.   [  --enable-satellite      satellite card support (default disabled)],
  1390.   [ if test "x${enable_satellite}" = "xyes"
  1391.     then
  1392.       PLUGINS="${PLUGINS} satellite"
  1393.     fi])
  1394.  
  1395. dnl
  1396. dnl  ipv6 plugin - not for QNX yet
  1397. dnl
  1398. if test "x${SYS}" != "xnto" && test "x${SYS}" != "xmingw32"
  1399. then
  1400.   have_ipv6=false
  1401.   AC_CHECK_FUNCS(inet_pton,[have_ipv6=:],[
  1402.     AC_CHECK_LIB(resolv,inet_pton,
  1403.       [have_ipv6=:
  1404.        LDFLAGS_ipv6="${LDFLAGS_ipv6} -lresolv"])
  1405.   ])
  1406.   AC_MSG_CHECKING(for sockaddr_in6 in netinet/in.h)
  1407.   AC_EGREP_HEADER(sockaddr_in6,netinet/in.h,
  1408.     [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); have_ipv6=false])
  1409.   if ${have_ipv6}; then
  1410.     PLUGINS="${PLUGINS} ipv6"
  1411.   fi
  1412. fi
  1413. if test "x${SYS}" = "xmingw32"
  1414. then
  1415.   AC_MSG_CHECKING(for getaddrinfo in ws2tcpip.h)
  1416.   AC_EGREP_HEADER(addrinfo,ws2tcpip.h,[AC_MSG_RESULT(yes)
  1417.     PLUGINS="${PLUGINS} ipv6"],[AC_MSG_RESULT(no)])
  1418. fi
  1419.  
  1420. dnl
  1421. dnl  ogg plugin
  1422. dnl
  1423. AC_ARG_ENABLE(ogg,
  1424.   [  --enable-ogg            Ogg demux support (default enabled)])
  1425. if test "x${enable_ogg}" != "xno"
  1426. then
  1427.   AC_CHECK_HEADERS(ogg/ogg.h, [
  1428.     AC_CHECK_LIB( ogg, oggpack_read, [
  1429.       PLUGINS="${PLUGINS} ogg"
  1430.       LDFLAGS_ogg="${LDFLAGS_ogg} -logg"
  1431.       AC_CHECK_LIB( ogg, oggpackB_read, [
  1432.         CPPFLAGS_ogg="${CPPFLAGS_ogg} -DHAVE_OGGPACKB"])])
  1433.    ],[])
  1434. fi
  1435.  
  1436. dnl
  1437. dnl  Codec plugins
  1438. dnl
  1439.  
  1440. AC_ARG_WITH(,[Codec plugins:])
  1441.  
  1442. dnl
  1443. dnl  mad plugin
  1444. dnl
  1445. AC_ARG_ENABLE(mad,
  1446.   [  --enable-mad            libmad module (default disabled)])
  1447. if test "x${enable_mad}" != "xno"
  1448. then
  1449.   AC_ARG_WITH(mad,
  1450.     [    --with-mad=PATH       path to libmad],[],[])
  1451.   if test "x${with_mad}" != "xno" -a "x${with_mad}" != "x"
  1452.   then
  1453.     CPPFLAGS_mpgatofixed32="${CPPFLAGS_mpgatofixed32} -I${with_mad}/include"
  1454.     LDFLAGS_mpgatofixed32="${LDFLAGS_mpgatofixed32} -L${with_mad}/lib"
  1455.   fi
  1456.  
  1457.   AC_ARG_WITH(mad-tree,
  1458.     [    --with-mad-tree=PATH  mad tree for static linking],[],[])
  1459.   if test "x${with_mad_tree}" != "xno" -a "x${with_mad_tree}" != "x"
  1460.   then
  1461.     real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
  1462.     if test "x${real_mad_tree}" = "x"
  1463.     then
  1464.       dnl  The given directory can't be found
  1465.       AC_MSG_RESULT(no)
  1466.       AC_MSG_ERROR([${with_mad_tree} directory doesn't exist])
  1467.     fi
  1468.     dnl  Use a custom libmad
  1469.     AC_MSG_CHECKING(for mad.h in ${real_mad_tree}/libmad)
  1470.     if test -f ${real_mad_tree}/libmad/mad.h
  1471.     then
  1472.       AC_MSG_RESULT(yes)
  1473.       CPPFLAGS_mpgatofixed32="${CPPFLAGS_mpgatofixed32} -I${real_mad_tree}/libmad"
  1474.       LDFLAGS_mpgatofixed32="${LDFLAGS_mpgatofixed32} -L${real_mad_tree}/libmad/.libs"
  1475.       LDFLAGS="${LDFLAGS_save} ${LDFLAGS_mpgatofixed32}"
  1476.       AC_CHECK_LIB(mad, mad_bit_init, [
  1477.         BUILTINS="${BUILTINS} mpgatofixed32"
  1478.         LDFLAGS_mpgatofixed32="${LDFLAGS_mpgatofixed32} -lmad"
  1479.         ],[ AC_MSG_ERROR([the specified tree hasn't been compiled ])
  1480.       ],[])
  1481.       LDFLAGS="${LDFLAGS_save}"
  1482.     else
  1483.       AC_MSG_RESULT(no)
  1484.       AC_MSG_ERROR([the specified tree doesn't have mad.h])
  1485.     fi
  1486.   else
  1487.     CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mpgatofixed32}"
  1488.     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_mpgatofixed32}"
  1489.     AC_CHECK_HEADERS(mad.h, ,
  1490.       [ AC_MSG_ERROR([Cannot find development headers for libmad...]) ])
  1491.     AC_CHECK_LIB(mad, mad_bit_init, [
  1492.       PLUGINS="${PLUGINS} mpgatofixed32"
  1493.       LDFLAGS_mpgatofixed32="${LDFLAGS_mpgatofixed32} -lmad" ],
  1494.       [ AC_MSG_ERROR([Cannot find libmad library...]) ])
  1495.     CPPFLAGS="${CPPFLAGS_save}"
  1496.     LDFLAGS="${LDFLAGS_save}"
  1497.   fi
  1498. fi
  1499.  
  1500. dnl
  1501. dnl   libid3tag support
  1502. dnl
  1503. AC_CHECK_HEADERS(id3tag.h, [
  1504.   AC_CHECK_HEADERS(zlib.h, [
  1505.     LDFLAGS_id3tag="${LDFLAGS_id3tag} -lid3tag -lz"
  1506.     PLUGINS="${PLUGINS} id3tag"]) ])
  1507.  
  1508. dnl
  1509. dnl  ffmpeg decoder plugin
  1510. dnl
  1511. AC_ARG_ENABLE(ffmpeg,
  1512. [  --enable-ffmpeg         ffmpeg codec (default disabled)])
  1513. if test "x${enable_ffmpeg}" = "xyes"
  1514. then
  1515.   AC_ARG_WITH(ffmpeg,
  1516.     [    --with-ffmpeg=PATH    path to ffmpeg installation],[],[])
  1517.   if test "x${with_ffmpeg}" != "xno" -a "x${with_ffmpeg}" != "x"
  1518.   then
  1519.     CPPFLAGS_ffmpeg="${CPPFLAGS_ffmpeg} -I${with_ffmpeg}/include/ffmpeg"
  1520.     LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -L${with_ffmpeg}/lib"
  1521.   fi
  1522.  
  1523.   dnl Add postprocessing modules
  1524.   PLUGINS="${PLUGINS} postprocessing_c"
  1525.   if test "x${ac_cv_mmx_inline}" != "xno"; then
  1526.     PLUGINS="${PLUGINS} postprocessing_mmx"
  1527.   fi
  1528.  
  1529.   if test "x${ac_cv_mmxext_inline}" != "xno"; then
  1530.     PLUGINS="${PLUGINS} postprocessing_mmxext"
  1531.   fi
  1532.  
  1533.   AC_ARG_WITH(ffmpeg-tree,
  1534.   [    --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
  1535.   if test "x${with_ffmpeg_tree}" != "x"
  1536.   then
  1537.     AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree})
  1538.     real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
  1539.     if test "x${real_ffmpeg_tree}" = x
  1540.     then
  1541.       dnl  The given directory can't be found
  1542.       AC_MSG_RESULT(no)
  1543.       AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}])
  1544.     fi
  1545.     if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"
  1546.     then
  1547.       dnl  Use a custom libffmpeg
  1548.       AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a)
  1549.       BUILTINS="${BUILTINS} ffmpeg"
  1550.       LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -L${real_ffmpeg_tree}/libavcodec -lavcodec"
  1551.       CPPFLAGS_ffmpeg="${CPPFLAGS_ffmpeg} -I${real_ffmpeg_tree}/libavcodec"
  1552.     else
  1553.       dnl  The given libavcodec wasn't built
  1554.       AC_MSG_RESULT(no)
  1555.       AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}])
  1556.     fi
  1557.   else
  1558.     CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}"
  1559.     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
  1560.     AC_CHECK_LIB(avcodec, avcodec_init, [
  1561.       BUILTINS="${BUILTINS} ffmpeg"
  1562.       LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lavcodec" ],
  1563.       [ AC_MSG_ERROR([Cannot find libavcodec library...]) ])
  1564.     LDFLAGS="${LDFLAGS_save}"
  1565.     CPPFLAGS="${CPPFLAGS_save}"
  1566.   fi
  1567. fi
  1568.  
  1569. dnl
  1570. dnl  faad decoder plugin
  1571. dnl
  1572. AC_ARG_ENABLE(faad,
  1573. [  --enable-faad           faad codec (default disabled)])
  1574. if test "x${enable_faad}" = "xyes"
  1575. then
  1576.   AC_ARG_WITH(faad,
  1577.     [    --with-faad=PATH      path to faad installation],[],[])
  1578.   if test "x${with_faad}" != "xno" -a "x${with_faad}" != "x"
  1579.   then
  1580.     CPPFLAGS_faad="${CPPFLAGS_faad} -I${with_faad}/include"
  1581.     LDFLAGS_faad="${LDFLAGS_faad} -L${with_faad}/lib"
  1582.   fi
  1583.   LDFLAGS_faad="${LDFLAGS_faad}"
  1584.  
  1585.   AC_ARG_WITH(faad-tree,
  1586.   [    --with-faad-tree=PATH faad tree for static linking])
  1587.   if test "x${with_faad_tree}" != "x"
  1588.   then
  1589.     AC_MSG_CHECKING(for libfaad.a in ${with_faad_tree})
  1590.     real_faad_tree="`cd ${with_faad_tree} 2>/dev/null && pwd`"
  1591.     if test "x${real_faad_tree}" = x
  1592.     then
  1593.       dnl  The given directory can't be found
  1594.       AC_MSG_RESULT(no)
  1595.       AC_MSG_ERROR([cannot cd to ${with_faad_tree}])
  1596.     fi
  1597.     if test -f "${real_faad_tree}/libfaad/.libs/libfaad.a"
  1598.     then
  1599.       dnl  Use a custom faad
  1600.       AC_MSG_RESULT(${real_faad_tree}/libfaad/.libs/libfaad.a)
  1601.       BUILTINS="${BUILTINS} faad"
  1602.       LDFLAGS_faad="${LDFLAGS_faad} -L${real_faad_tree}/libfaad/.libs -lfaad"
  1603.       CPPFLAGS_faad="${CPPFLAGS_faad} -I${real_faad_tree}/include"
  1604.     else
  1605.       dnl  The given libfaad wasn't built
  1606.       AC_MSG_RESULT(no)
  1607.       AC_MSG_ERROR([cannot find ${real_faad_tree}/libfaad/.libs/libfaad.a, make sure you compiled libfaad in ${with_faad_tree}])
  1608.     fi
  1609.   else
  1610.     CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_faad}"
  1611.     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_faad}"
  1612.     AC_CHECK_HEADERS(faad.h, ,
  1613.       [ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ])
  1614.     AC_CHECK_LIB(faad, faacDecOpen, [
  1615.       PLUGINS="${PLUGINS} faad"
  1616.       LDFLAGS_faad="${LDFLAGS_faad} -lfaad" ],
  1617.       [ AC_MSG_ERROR([Cannot find libfaad library...]) ])
  1618.     LDFLAGS="${LDFLAGS_save}"
  1619.     CPPFLAGS="${CPPFLAGS_save}"
  1620.   fi
  1621. fi
  1622.  
  1623.  
  1624. dnl
  1625. dnl  xvid decoder plugin
  1626. dnl
  1627. AC_ARG_ENABLE(xvid,
  1628. [  --enable-xvid           xvid codec (default disabled)])
  1629. if test "x${enable_xvid}" = "xyes"
  1630. then
  1631.   AC_ARG_WITH(xvid,
  1632.     [    --with-xvid=PATH      path to xvid installation],[],[])
  1633.   if test "x${with_xvid}" != "xno" -a "x${with_xvid}" != "x"
  1634.   then
  1635.     CPPFLAGS_xvid="${CPPFLAGS_xvid} -I${with_xvid}/include"
  1636.     LDFLAGS_xvid="${LDFLAGS_xvid} -L${with_xvid}/lib"
  1637.   fi
  1638.   LDFLAGS_xvid="${LDFLAGS_xvid}"
  1639.  
  1640.   AC_ARG_WITH(xvid-tree,
  1641.   [    --with-xvid-tree=PATH xvid tree for static linking])
  1642.   if test "x${with_xvid_tree}" != "x"
  1643.   then
  1644.     AC_MSG_CHECKING(for libxvidcore.a in ${with_xvid_tree})
  1645.     real_xvid_tree="`cd ${with_xvid_tree} 2>/dev/null && pwd`"
  1646.     if test "x${real_xvid_tree}" = x
  1647.     then
  1648.       dnl  The given directory can't be found
  1649.       AC_MSG_RESULT(no)
  1650.       AC_MSG_ERROR([cannot cd to ${with_xvid_tree}])
  1651.     fi
  1652.     if test -f "${real_xvid_tree}/build/generic/libxvidcore.a"
  1653.     then
  1654.       dnl  Use a custom xvid
  1655.       AC_MSG_RESULT(${real_xvid_tree}/build/generic/libxvidcore.a)
  1656.       BUILTINS="${BUILTINS} xvid"
  1657.       LDFLAGS_xvid="${LDFLAGS_xvid} -L${real_xvid_tree}/build/generic -lxvidcore"
  1658.       CPPFLAGS_xvid="${CPPFLAGS_xvid} -I${real_xvid_tree}/src"
  1659.     else
  1660.       dnl  The given libxvidcore wasn't built
  1661.       AC_MSG_RESULT(no)
  1662.       AC_MSG_ERROR([cannot find ${real_xvid_tree}/build/generic/libxvidcore.a, make sure you compiled libxvidcore in ${with_xvid_tree}])
  1663.     fi
  1664.   else
  1665.     CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_xvid}"
  1666.     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_xvid}"
  1667.     AC_CHECK_HEADERS(xvid.h, ,
  1668.       [ AC_MSG_ERROR([Cannot find development headers for libxvidcore...]) ])
  1669.     AC_CHECK_LIB(xvidcore, xvid_init, [
  1670.       PLUGINS="${PLUGINS} xvid"
  1671.       LDFLAGS_xvid="${LDFLAGS_xvid} -lxvidcore" ],
  1672.       [ AC_MSG_ERROR([Cannot find libxvidcore library...]) ])
  1673.     LDFLAGS="${LDFLAGS_save}"
  1674.     CPPFLAGS="${CPPFLAGS_save}"
  1675.   fi
  1676. fi
  1677.  
  1678.  
  1679.  
  1680. dnl
  1681. dnl MP4 module
  1682. dnl
  1683. AC_CHECK_HEADERS(zlib.h, [
  1684.   LDFLAGS_mp4="${LDFLAGS_mp4} -lz"
  1685.   LDFLAGS_skins="${LDFLAGS_skins} -lz"
  1686. ] )
  1687.  
  1688.  
  1689. dnl
  1690. dnl skins module
  1691. dnl
  1692. AC_CHECK_HEADERS(libtar.h, [
  1693.   LDFLAGS_skins="${LDFLAGS_skins} -ltar"
  1694. ] )
  1695.  
  1696.  
  1697.  
  1698. dnl
  1699. dnl  a52 AC3 decoder plugin
  1700. dnl
  1701. AC_ARG_ENABLE(a52,
  1702.   [  --enable-a52            A/52 support with liba52 (default enabled)])
  1703. if test "x${enable_a52}" != "xno"
  1704. then
  1705.   AC_ARG_WITH(a52,
  1706.     [    --with-a52=PATH       a52 headers and libraries])
  1707.   AC_ARG_WITH(a52-tree,
  1708.     [    --with-a52-tree=PATH  a52dec tree for static linking ],[],[])
  1709.   if test "x${with_a52_tree}" != "xno" -a "x${with_a52_tree}" != "x"
  1710.   then
  1711.     real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
  1712.     if test "x${real_a52_tree}" = "x"
  1713.     then
  1714.       dnl  The given directory can't be found
  1715.       AC_MSG_RESULT(no)
  1716.       AC_MSG_ERROR([${with_a52_tree} directory doesn't exist])
  1717.     fi
  1718.     dnl  Use a custom a52dec
  1719.     AC_MSG_CHECKING(for a52.h in ${real_a52_tree}/include)
  1720.     if test -f ${real_a52_tree}/include/a52.h
  1721.     then
  1722.       AC_MSG_RESULT(yes)
  1723.       CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} -I${real_a52_tree}"
  1724.       LDFLAGS_a52tofloat32="${LDFLAGS_a52tofloat32} -L${real_a52_tree}/liba52/.libs"
  1725.       LDFLAGS="${LDFLAGS_save} ${LDFLAGS_a52tofloat32}"
  1726.       AC_CHECK_LIB(a52, a52_free, [
  1727.         BUILTINS="${BUILTINS} a52tofloat32"
  1728.         LDFLAGS_a52tofloat32="-la52 ${LDFLAGS_a52tofloat32}"
  1729.         CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} -DUSE_A52DEC_TREE"
  1730.         ],[
  1731.         if test -f ${real_a52_tree}/liba52/.libs/liba52.a
  1732.         then
  1733.           AC_MSG_ERROR([make sure you have at least a52dec-0.7.3])
  1734.         else
  1735.           AC_MSG_ERROR([the specified tree hasn't been compiled])
  1736.         fi
  1737.       ])
  1738.       LDFLAGS="${LDFLAGS_save}"
  1739.     else
  1740.       AC_MSG_RESULT(no)
  1741.       AC_MSG_ERROR([the specified tree doesn't have a52.h])
  1742.     fi
  1743.   else
  1744.     if test "x${with_a52}" = "x"
  1745.     then
  1746.       LDFLAGS_test=""
  1747.       CPPFLAGS_test=""
  1748.     else
  1749.       LDFLAGS_test="-L${with_a52}/lib"
  1750.       CPPFLAGS_test="-I${with_a52}/include"
  1751.     fi
  1752.     CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test} ${CPPFLAGS_a52tofloat32}"
  1753.     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_test} ${LDFLAGS_a52tofloat32}"
  1754.     AC_CHECK_HEADERS(a52dec/a52.h, [
  1755.       AC_CHECK_LIB(a52, a52_free, [
  1756.         PLUGINS="${PLUGINS} a52tofloat32"
  1757.         LDFLAGS_a52tofloat32="${LDFLAGS_test} -la52 ${LDFLAGS_a52tofloat32}"
  1758.         CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} ${CPPFLAGS_test}"
  1759.       ],[
  1760.         AC_MSG_ERROR([Could not find a52 on your system: you may get it from http://liba52.sf.net/. Alternatively you can use --disable-a52 to disable the a52 plugin.])
  1761.       ])
  1762.     ])
  1763.     CPPFLAGS="${CPPFLAGS_save}"
  1764.     LDFLAGS="${LDFLAGS_save}"
  1765.   fi
  1766. fi
  1767.  
  1768. dnl
  1769. dnl  DV plugin
  1770. dnl
  1771. AC_ARG_ENABLE(dv,
  1772.   [  --enable-dv             DV decoder support (default disabled)])
  1773. if test "x${enable_dv}" = "xyes"
  1774. then
  1775.   AC_CHECK_HEADERS(libdv/dv.h, [
  1776.     PLUGINS="${PLUGINS} dv"
  1777.     LDFLAGS_dv="${LDFLAGS_dv} -ldv"
  1778.    ],[])
  1779. fi
  1780.  
  1781. dnl
  1782. dnl  Flac plugin
  1783. dnl
  1784. AC_ARG_ENABLE(flac,
  1785.   [  --enable-flac           flac decoder support (default disabled)])
  1786. if test "x${enable_flac}" = "xyes"
  1787. then
  1788.   AC_CHECK_HEADERS(FLAC/stream_decoder.h, [
  1789.     PLUGINS="${PLUGINS} flac flacdec"
  1790.     LDFLAGS_flacdec="${LDFLAGS_flacdec} -lFLAC"
  1791.    ],[])
  1792. fi
  1793.  
  1794. dnl
  1795. dnl  Libmpeg2 plugin
  1796. dnl
  1797. AC_ARG_ENABLE(libmpeg2,
  1798.   [  --enable-libmpeg2       libmpeg2 decoder support (default disabled)])
  1799. if test "x${enable_libmpeg2}" = "xyes"
  1800. then
  1801.   AC_CHECK_HEADERS(mpeg2dec/mpeg2.h, [
  1802.     PLUGINS="${PLUGINS} libmpeg2"
  1803.     LDFLAGS_libmpeg2="${LDFLAGS_libmpeg2} -lmpeg2"
  1804.    ],[])
  1805. fi
  1806.  
  1807. dnl
  1808. dnl  Vorbis plugin
  1809. dnl
  1810. AC_ARG_ENABLE(vorbis,
  1811.   [  --enable-vorbis         Vorbis decoder support (default enabled)])
  1812. if test "x${enable_vorbis}" != "xno"
  1813. then
  1814.   AC_CHECK_HEADERS(vorbis/codec.h, [
  1815.     PLUGINS="${PLUGINS} vorbis"
  1816.     LDFLAGS_vorbis="${LDFLAGS_vorbis} -lvorbis -logg"
  1817.    ],[])
  1818. fi
  1819.          
  1820. dnl
  1821. dnl  Tremor plugin
  1822. dnl
  1823. AC_ARG_ENABLE(tremor,
  1824.   [  --enable-tremor         Tremor decoder support (default disabled)])
  1825. if test "x${enable_tremor}" = "xyes"
  1826. then
  1827.   AC_CHECK_HEADERS(tremor/ivorbiscodec.h, [
  1828.     PLUGINS="${PLUGINS} tremor"
  1829.     LDFLAGS_tremor="${LDFLAGS_tremor} -lvorbisidec -logg"
  1830.    ],[])
  1831. fi
  1832.  
  1833. dnl
  1834. dnl  tarkin decoder plugin
  1835. dnl
  1836. AC_ARG_ENABLE(tarkin,
  1837. [  --enable-tarkin         experimental tarkin codec (default disabled)])
  1838. if test "x${enable_tarkin}" = "xyes"
  1839. then
  1840.   AC_ARG_WITH(tarkin-tree,
  1841.   [    --with-tarkin-tree=PATH tarkin tree for static linking])
  1842.   if test "x${with_tarkin_tree}" != "x"
  1843.   then
  1844.     AC_MSG_CHECKING(for tarkin.o in ${with_tarkin_tree})
  1845.     real_tarkin_tree="`cd ${with_tarkin_tree} 2>/dev/null && pwd`"
  1846.     if test -f "${real_tarkin_tree}/tarkin.o"
  1847.     then
  1848.       BUILTINS="${BUILTINS} tarkin"
  1849.       CPPFLAGS_tarkin="${CPPFLAGS_tarkin} -I${real_tarkin_tree}"
  1850.       LDFLAGS_tarkin="${LDFLAGS_tarkin} ${real_tarkin_tree}/mem.o ${real_tarkin_tree}/pnm.o ${real_tarkin_tree}/wavelet.o ${real_tarkin_tree}/wavelet_xform.o ${real_tarkin_tree}/wavelet_coeff.o ${real_tarkin_tree}/yuv.o ${real_tarkin_tree}/tarkin.o ${real_tarkin_tree}/info.o -logg"
  1851.       AC_MSG_RESULT(yes)
  1852.     else
  1853.       dnl  The given tarkin tree wasn't built
  1854.       AC_MSG_RESULT(no)
  1855.       AC_MSG_ERROR([cannot find ${real_tarkin_tree}/tarkin.o,
  1856.                     make sure you compiled tarkin in ${with_tarkin_tree}])
  1857.     fi
  1858.   fi
  1859. fi
  1860.  
  1861. dnl
  1862. dnl  theora decoder plugin
  1863. dnl
  1864. AC_ARG_ENABLE(theora,
  1865. [  --enable-theora         experimental theora codec (default disabled)])
  1866. if test "x${enable_theora}" = "xyes"
  1867. then
  1868.   AC_CHECK_HEADERS(theora/theora.h, [
  1869.     AC_CHECK_LIB(theora, theora_granule_time, [
  1870.       BUILTINS="${BUILTINS} theora"
  1871.       LDFLAGS_theora="${LDFLAGS_theora} -ltheora -logg" ],[
  1872.       AC_MSG_ERROR([libtheora doesn't appear to be installed on you system.
  1873. You also need to check that you have a libogg posterior to the 1.0 release.])],
  1874.       [-logg])
  1875.   ])
  1876. fi
  1877.  
  1878. dnl
  1879. dnl  Video plugins
  1880. dnl
  1881.  
  1882. AC_ARG_WITH(,[Video plugins:])
  1883.  
  1884. dnl
  1885. dnl  X11 module
  1886. dnl  (enabled by default except on win32)
  1887. dnl
  1888. AC_ARG_ENABLE(x11,
  1889.   [  --enable-x11            X11 support (default enabled)])
  1890. if test "x${enable_x11}" != "xno" &&
  1891.   (test "x${SYS}" != "xmingw32" || test "x${enable_x11}" = "xyes"); then
  1892.   CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
  1893.   AC_CHECK_HEADERS(X11/Xlib.h, [
  1894.     PLUGINS="${PLUGINS} x11"
  1895.     LDFLAGS_x11="${LDFLAGS_x11} -L${x_libraries} -lX11 -lXext"
  1896.     CPPFLAGS_x11="${CPPFLAGS_x11} -I${x_includes}"
  1897.   ])
  1898.   CPPFLAGS="${CPPFLAGS_save}"
  1899. fi
  1900.  
  1901. dnl
  1902. dnl  XVideo module
  1903. dnl  (enabled by default except on win32)
  1904. dnl
  1905. AC_ARG_ENABLE(xvideo,
  1906.   [  --enable-xvideo         XVideo support (default enabled)])
  1907. if test "x${enable_xvideo}" != "xno" &&
  1908.   (test "x${SYS}" != "xmingw32" || test "x${enable_xvideo}" = "xyes"); then
  1909.   CPPFLAGS="${CPPFLAGS_save} -I${x_includes}"
  1910.   AC_CHECK_HEADERS(X11/extensions/Xv.h, [
  1911.     CFLAGS="${CFLAGS_save} -L${x_libraries} -lX11 -lXext"
  1912.     AC_CHECK_LIB(Xv_pic,XvPutImage,
  1913.       # We have Xv_pic, that's good, we can build an xvideo.so plugin !
  1914.       PLUGINS="${PLUGINS} xvideo"
  1915.       LDFLAGS_xvideo="${LDFLAGS_xvideo} -L${x_libraries} -lX11 -lXext -lXv_pic"
  1916.       CPPFLAGS_xvideo="${CPPFLAGS_xvideo} -I${x_includes}",
  1917.       AC_CHECK_LIB(Xv,XvPutImage,
  1918.         # We don't have Xv_pic, but we have Xv, let's make xvideo.a as builtin
  1919.         PLUGINS="${PLUGINS} xvideo"
  1920.         LDFLAGS_xvideo="${LDFLAGS_xvideo} -L${x_libraries} -lX11 -lXext -lXv"
  1921.         CPPFLAGS_xvideo="${CPPFLAGS_xvideo} -I${x_includes}",
  1922.         # Otherwise... well, do nothing.
  1923.         :
  1924.       )
  1925.     )
  1926.     CFLAGS="${CFLAGS_save}"
  1927.   ]
  1928.   CPPFLAGS="${CPPFLAGS_save}")
  1929. fi
  1930.  
  1931. dnl
  1932. dnl  SDL module
  1933. dnl
  1934. AC_ARG_ENABLE(sdl,
  1935.   [  --enable-sdl            SDL support (default enabled)])
  1936. if test "x${enable_sdl}" != "xno"
  1937. then
  1938.   SDL_PATH="${PATH}"
  1939.   AC_ARG_WITH(sdl-config-path,
  1940.     [    --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)],
  1941.     [ if test "x${with_sdl_config_path}" != "xno"
  1942.       then
  1943.         SDL_PATH="${with_sdl_config_path}:${PATH}"
  1944.       fi ])
  1945.   AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no, ${SDL_PATH})
  1946.   SDL_CONFIG="${SDL12_CONFIG}"
  1947.   SDL_HEADER="SDL12/SDL.h"
  1948.   if test "x${SDL_CONFIG}" = "xno"
  1949.   then
  1950.     AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no, ${SDL_PATH})
  1951.     SDL_CONFIG=${SDL11_CONFIG}
  1952.     SDL_HEADER="SDL11/SDL.h"
  1953.   fi
  1954.   if test "x${SDL_CONFIG}" = "xno"
  1955.   then
  1956.     AC_PATH_PROG(SDL_CONFIG, sdl-config, no, ${SDL_PATH})
  1957.     SDL_HEADER="SDL/SDL.h"
  1958.   fi
  1959.   # check for cross-compiling
  1960.   SDL_PREFIX=
  1961.   AC_ARG_WITH(sdl-prefix,
  1962.     [    --with-sdl-prefix=PATH path to libsdl (needed for cross-compiling),
  1963.                                e.g use as:
  1964.                                --with-sdl-prefix=/usr/local/arm/2.95.3/arm-linux/usr)],[],[])
  1965.   if test "x${with_sdl_prefix}" != "xno" -a "x${with_sdl_prefix}" != "x"
  1966.   then
  1967.     SDL_PREFIX="--prefix=${with_sdl_prefix}"
  1968.   fi
  1969.   if test "x${SDL_CONFIG}" != "xno"
  1970.   then
  1971.     PLUGINS="${PLUGINS} vout_sdl aout_sdl"
  1972.     CFLAGS_vout_sdl="${CFLAGS_vout_sdl} `${SDL_CONFIG} ${SDL_PREFIX} --cflags | sed 's,SDL,,'`"
  1973.     LDFLAGS_vout_sdl="${LDFLAGS_vout_sdl} `${SDL_CONFIG} ${SDL_PREFIX} --libs | sed 's,-rdynamic,,'`"
  1974.     CFLAGS_aout_sdl="${CFLAGS_aout_sdl} `${SDL_CONFIG} ${SDL_PREFIX} --cflags | sed 's,SDL,,'`"
  1975.     LDFLAGS_aout_sdl="${LDFLAGS_aout_sdl} `${SDL_CONFIG} ${SDL_PREFIX} --libs | sed 's,-rdynamic,,'`"
  1976.     CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_vout_sdl}"
  1977.     AC_CHECK_HEADERS(${SDL_HEADER}, AC_DEFINE_UNQUOTED(SDL_INCLUDE_FILE,
  1978.       <${SDL_HEADER}>, Indicate whether we should use SDL/SDL.h or SDL11/SDL.h),
  1979.       [ AC_CHECK_HEADERS(SDL.h, AC_DEFINE(SDL_INCLUDE_FILE, <SDL.h>,
  1980.           As a last resort we also test for SDL.h presence),
  1981.       [ AC_MSG_ERROR([The development package for SDL is not installed.
  1982. Please install it and try again. Alternatively you can also configure with
  1983. --disable-sdl.])
  1984.       ])])
  1985.     CPPFLAGS="${CPPFLAGS_save}"
  1986.     if expr 1.1.5 \> `${SDL_CONFIG} --version` >/dev/null
  1987.     then
  1988.       AC_MSG_ERROR([The development package for SDL is not installed.
  1989. Please install it and try again. Alternatively you can also configure with
  1990. --disable-sdl.])
  1991.     fi
  1992.   elif test "x${enable_sdl}" =  "xyes"
  1993.   then
  1994.     AC_MSG_ERROR([I couldn't find the SDL package. You can download libSDL
  1995. from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
  1996.     ])
  1997.   fi
  1998. fi
  1999.  
  2000. dnl
  2001. dnl  freetype module
  2002. dnl
  2003. AC_ARG_ENABLE(freetype,
  2004.   [  --enable-freetype       freetype support (default enabled)])
  2005. if test "x${enable_freetype}" != "xno"
  2006. then
  2007.   FREETYPE_PATH="${PATH}"
  2008.   AC_ARG_WITH(freetype-config-path,
  2009.     [    --with-freetype-config-path=PATH freetype-config path (default search in \$PATH)],
  2010.     [ if test "x${with_freetype_config_path}" != "xno"
  2011.       then
  2012.         FREETYPE_PATH="${with_freetype_config_path}:${PATH}"
  2013.       fi ])
  2014.   AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no, ${FREETYPE_PATH})
  2015.  
  2016.   if test "x${FREETYPE_CONFIG}" != "xno" -a "x${have_xosd}" = "xtrue"
  2017.   then
  2018.     PLUGINS="${PLUGINS} osdtext"
  2019.     CFLAGS_osdtext="${CFLAGS_osdtext} `${FREETYPE_CONFIG} --cflags`"
  2020.     LDFLAGS_osdtext="${LDFLAGS_osdtext} `${FREETYPE_CONFIG} --libs`"
  2021.     CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_freetype}"
  2022.   elif test "x${enable_freetype}" =  "xyes"
  2023.   then
  2024.     AC_MSG_ERROR([I couldn't find the freetype package. You can download libfreetype2
  2025. from http://www.freetype.org/, or configure with --disable-freetype. Have a nice day.
  2026.     ])
  2027.   fi
  2028. fi
  2029.  
  2030. dnl
  2031. dnl  Qt Embedded module
  2032. dnl  (disabled by default)
  2033. dnl
  2034. AC_ARG_ENABLE(qte,
  2035.   [  --enable-qte            QT Embedded support (default disabled)])
  2036. if test "x${enable_qte}" = "xyes"
  2037. then
  2038.   AC_ARG_WITH(qte,
  2039.   [    --with-qte=PATH       Qt Embedded headers and libraries])
  2040.   if test "x${with_qte}" != "xno" -a "x${with_qte}" != "x"
  2041.   then
  2042.     LDFLAGS_qte="${LDFLAGS_qte} -L${with_qte}/lib `echo -L${with_qte}/lib | sed 's,opt/QtPalmtop,usr,'` -ljpeg -lqte"
  2043.     CPPFLAGS_qte="${CPPFLAGS_qte} -I${with_qte}/include `echo -I${with_qte}/include | sed 's,opt/QtPalmtop,usr,'` -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti"
  2044.   else
  2045.     LDFLAGS_qte="${LDFLAGS_qte} -L${QTDIR}/lib `echo -L${QTDIR}/lib | sed 's,opt/QtPalmtop,usr,'` -ljpeg -lqte"
  2046.     CPPFLAGS_qte="${CPPFLAGS_qte} -I${QTDIR}/include `echo -I${QTDIR}/include | sed 's,opt/QtPalmtop,usr,'` -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti"
  2047.   fi
  2048.   PLUGINS="${PLUGINS} qte"
  2049.   NEED_QTE_MAIN=yes
  2050.   CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_qte}"
  2051.   AC_CHECK_HEADERS(qt.h jpeglib.h, ,[
  2052.     AC_MSG_ERROR([echo "Cannot find QT Embedded development headers."])
  2053.   ] )
  2054.   CPPFLAGS="${CPPFLAGS_save}"
  2055. fi
  2056.  
  2057. dnl
  2058. dnl  Windows DirectX module
  2059. dnl
  2060. AC_ARG_ENABLE(directx,
  2061.   [  --enable-directx        Win32 DirectX support (default enabled on Win32)])
  2062. if test "x${enable_directx}" != "xno"
  2063. then
  2064.   if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"
  2065.   then
  2066.     AC_ARG_WITH(directx,
  2067.     [    --with-directx=PATH   Win32 DirectX headers])
  2068.     if test "x${with_directx}" = "x"
  2069.     then
  2070.       AC_CHECK_HEADERS(ddraw.h,
  2071.       [ PLUGINS="${PLUGINS} vout_directx aout_directx"
  2072.         LDFLAGS_vout_directx="${LDFLAGS_directx} -lgdi32" ])
  2073.     else
  2074.       AC_MSG_CHECKING(for directX headers in ${with_directx})
  2075.       if test -f ${with_directx}/ddraw.h
  2076.       then
  2077.         PLUGINS="${PLUGINS} vout_directx aout_directx"
  2078.         LDFLAGS_vout_directx="${LDFLAGS_directx} -lgdi32"
  2079.         CPPFLAGS_vout_directx="${CPPFLAGS_vout_directx} -I${with_directx}"
  2080.         CPPFLAGS_aout_directx="${CPPFLAGS_aout_directx} -I${with_directx}"
  2081.         AC_MSG_RESULT(yes)
  2082.       else
  2083.         AC_MSG_RESULT(no)
  2084.         AC_MSG_ERROR([Cannot find ${with_directx}/ddraw.h!])
  2085.       fi
  2086.     fi
  2087.   fi
  2088. fi
  2089.  
  2090. dnl
  2091. dnl  Linux framebuffer module
  2092. dnl
  2093. AC_ARG_ENABLE(fb,
  2094.   [  --enable-fb             Linux framebuffer support (default enabled on Linux)])
  2095.     if test "x${enable_fb}" != "xno"
  2096.     then
  2097.       AC_CHECK_HEADERS(linux/fb.h, [
  2098.         PLUGINS="${PLUGINS} fb"
  2099.       ])
  2100.     fi
  2101.  
  2102. dnl
  2103. dnl  Linux MGA module
  2104. dnl
  2105. AC_ARG_ENABLE(mga,
  2106.   [  --enable-mga            Linux kernel Matrox support (default disabled)],
  2107.   [ if test "x${enable_mga}" = "xyes"
  2108.     then
  2109.       PLUGINS="${PLUGINS} mga xmga"
  2110.     fi ])
  2111.  
  2112. dnl
  2113. dnl  SVGAlib module
  2114. dnl
  2115. AC_ARG_ENABLE(svgalib,
  2116.   [  --enable-svgalib        SVGAlib support (default disabled)])
  2117. if test "x${enable_svgalib}" = "xyes"
  2118. then
  2119.   PLUGINS="${PLUGINS} svgalib"
  2120.   LDFLAGS_svgalib="${LDFLAGS_svgalib} -lvgagl -lvga"
  2121. fi
  2122.  
  2123. dnl
  2124. dnl  GGI module
  2125. dnl
  2126. AC_ARG_ENABLE(ggi,
  2127.   [  --enable-ggi            GGI support (default disabled)])
  2128. if test "x${enable_ggi}" = "xyes"
  2129. then
  2130.   PLUGINS="${PLUGINS} ggi"
  2131.   LDFLAGS_ggi="${LDFLAGS_ggi} -lggi"
  2132.   AC_ARG_WITH(ggi,
  2133.     [    --with-ggi=PATH       path to libggi],
  2134.     [ if test "x${with_ggi}" != "xno" -a "x${with_ggi}" != "x"
  2135.       then
  2136.         CPPFLAGS_ggi="${CPPFLAGS_ggi} -I${with_ggi}/include"
  2137.         LDFLAGS_ggi="${LDFLAGS_ggi} -L${with_ggi}/lib"
  2138.       fi ])
  2139. fi
  2140.  
  2141. dnl
  2142. dnl  Glide module
  2143. dnl
  2144. AC_ARG_ENABLE(glide,
  2145.   [  --enable-glide          Glide (3dfx) support (default disabled)])
  2146. if test "x${enable_glide}" = "xyes"
  2147. then
  2148.   PLUGINS="${PLUGINS} glide"
  2149.   LDFLAGS_glide="${LDFLAGS_glide} -lglide2x -lm"
  2150.   CPPFLAGS_glide="${CPPFLAGS_glide} -I/usr/include/glide"
  2151.   AC_ARG_WITH(glide,
  2152.     [    --with-glide=PATH     path to libglide],
  2153.     [ if test "x${with_glide}" != "xno" -a "x${with_glide}" != "x"
  2154.       then
  2155.         CPPFLAGS_glide="${CPPFLAGS_glide} -I${with_glide}/include"
  2156.         LDFLAGS_glide="${LDFLAGS_glide} -L${with_glide}/lib"
  2157.       fi ])
  2158. fi
  2159.  
  2160. dnl
  2161. dnl  AA plugin
  2162. dnl
  2163. AC_ARG_ENABLE(aa,
  2164.   [  --enable-aa             aalib output (default disabled)])
  2165. if test "x${enable_aa}" = "xyes"
  2166. then
  2167.   AC_CHECK_HEADER(aalib.h,have_aa="true",have_aa="false")
  2168.   if test "x${have_aa}" = "xtrue"
  2169.   then
  2170.     PLUGINS="${PLUGINS} aa"
  2171.     LDFLAGS_aa="${LDFLAGS_aa} -laa"
  2172.   fi
  2173. fi
  2174.  
  2175. dnl
  2176. dnl  win32 GDI plugin
  2177. dnl
  2178. AC_ARG_ENABLE(wingdi,
  2179.   [  --enable-wingdi         Win32 GDI module (default enabled on Win32)])
  2180. if test "x${enable_wingdi}" != "xno"; then
  2181.   if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"; then
  2182.     PLUGINS="${PLUGINS} wingdi"
  2183.     LDFLAGS_wingdi="${LDFLAGS_wingdi} -lgdi32"
  2184.   fi
  2185. fi
  2186.  
  2187. dnl
  2188. dnl  Audio plugins
  2189. dnl
  2190.  
  2191. AC_ARG_WITH(,[Audio plugins:])
  2192.  
  2193. dnl
  2194. dnl  OSS /dev/dsp module (enabled by default except on win32)
  2195. dnl
  2196. AC_ARG_ENABLE(oss,
  2197.   [  --enable-oss            Linux OSS /dev/dsp support (enabled on Linux)])
  2198.  
  2199. if test "x${enable_oss}" != "xno" &&
  2200.   (test "x${SYS}" != "xmingw32" || test "x${enable_oss}" = "xyes")
  2201. then
  2202.   AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h, [
  2203.     PLUGINS="${PLUGINS} oss"
  2204.     AC_CHECK_LIB(ossaudio,main,LDFLAGS_oss="${LDFLAGS_oss} -lossaudio")
  2205.   ])
  2206. fi
  2207.  
  2208. dnl
  2209. dnl  Esound module
  2210. dnl
  2211. AC_ARG_ENABLE(esd,
  2212.   [  --enable-esd            Esound library support (default disabled)],
  2213.   [if test "x${enable_esd}" = "xyes"
  2214.    then
  2215.      AC_PATH_PROG(ESD_CONFIG, esd-config, no)
  2216.      if test "x${ESD_CONFIG}" != "xno"
  2217.      then
  2218.        PLUGINS="${PLUGINS} esd"
  2219.        CFLAGS_esd="${CFLAGS_esd} `${ESD_CONFIG} --cflags`"
  2220.        LDFLAGS_esd="${LDFLAGS_esd} `${ESD_CONFIG} --libs`"
  2221.      fi
  2222.    fi])
  2223.  
  2224. dnl
  2225. dnl  aRts module
  2226. dnl
  2227. AC_ARG_ENABLE(arts,
  2228.   [  --enable-arts           aRts sound server (default disabled)],
  2229.   [if test "x${enable_arts}" = "xyes"
  2230.    then
  2231.      AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
  2232.      if test "x${ARTS_CONFIG}" != "xno"
  2233.      then
  2234.        PLUGINS="${PLUGINS} arts"
  2235.        CFLAGS_arts="${CFLAGS_arts} `${ARTS_CONFIG} --cflags`"
  2236.        LDFLAGS_arts="${LDFLAGS_arts} `${ARTS_CONFIG} --libs `"
  2237.      fi
  2238.    fi])
  2239.  
  2240. dnl
  2241. dnl  ALSA module
  2242. dnl
  2243. AC_ARG_ENABLE(alsa,
  2244.   [  --enable-alsa           ALSA sound support for Linux (default disabled)],
  2245.   [if test "x${enable_alsa}" = "xyes"
  2246.    then
  2247.      AC_CHECK_HEADER(alsa/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
  2248.      if test "x${have_alsa}" = "xtrue"
  2249.      then
  2250.        AC_TRY_COMPILE([#define ALSA_PCM_NEW_HW_PARAMS_API
  2251.                        #define ALSA_PCM_NEW_SW_PARAMS_API
  2252.                        #include <alsa/asoundlib.h>],
  2253.           [void foo() { snd_pcm_hw_params_get_period_time(0,0,0); }],
  2254.            AC_DEFINE(HAVE_ALSA_NEW_API, 1, Define if ALSA is at least rc4))
  2255.        PLUGINS="${PLUGINS} alsa"
  2256.        LDFLAGS_alsa="${LDFLAGS_alsa} -lasound -lm -ldl"
  2257.      else
  2258.        AC_MSG_ERROR([Could not find ALSA development headers])
  2259.      fi
  2260.    fi])
  2261.  
  2262. dnl
  2263. dnl  win32 waveOut plugin
  2264. dnl
  2265. AC_ARG_ENABLE(waveout,
  2266.   [  --enable-waveout        Win32 waveOut module (default enabled on Win32)])
  2267. if test "x${enable_waveout}" != "xno"; then
  2268.   if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"; then
  2269.     PLUGINS="${PLUGINS} waveout"
  2270.     LDFLAGS_waveout="-lwinmm"
  2271.   fi
  2272. fi
  2273.  
  2274. dnl
  2275. dnl  CoreAudio plugin
  2276. dnl
  2277. AC_ARG_ENABLE(coreaudio,
  2278.   [  --enable-coreaudio      CoreAudio module (default enabled on MacOS X)])
  2279. if test "x${enable_coreaudio}" != "xno" &&
  2280.   (test "x${SYS}" = "xdarwin" || test "x${enable_coreaudio}" = "xyes")
  2281. then
  2282.   AC_CHECK_HEADERS(CoreAudio/CoreAudio.h, 
  2283.     [ BUILTINS="${BUILTINS} coreaudio"
  2284.       LDFLAGS_coreaudio="${LDFLAGS_coreaudio} -framework CoreAudio"
  2285.       AC_MSG_CHECKING(for kAudioConverterPrimeMethod in AudioToolbox/AudioConverter.h)
  2286.       AC_EGREP_HEADER(kAudioConverterPrimeMethod,AudioToolbox/AudioConverter.h,[
  2287.         AC_MSG_RESULT(yes)
  2288.         PLUGINS="${PLUGINS} coreaudio_resampler"
  2289.         LDFLAGS_coreaudio_resampler="${LDFLAGS_coreaudio_resampler} -framework AudioToolbox"
  2290.       ],[ AC_MSG_RESULT(no) ])
  2291.     ], [ AC_MSG_ERROR([cannot find CoreAudio headers]) ])
  2292. fi
  2293.  
  2294. dnl
  2295. dnl  Interface plugins
  2296. dnl
  2297.  
  2298. AC_ARG_WITH(,[Interface plugins:])
  2299.  
  2300. dnl special case for BeOS
  2301. if test "x${SYS}" = "xbeos"
  2302. then
  2303.     PLUGINS="${PLUGINS} beos"
  2304. fi
  2305.  
  2306. dnl
  2307. dnl Skins module
  2308. dnl
  2309. AC_ARG_ENABLE(skins,
  2310.   [  --enable-skins          Win32 skins module (default enabled on Win32)])
  2311. if test "x${enable_skins}" != "xno"; then
  2312.   if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"; then
  2313.     PLUGINS="${PLUGINS} skins"
  2314.     CPPFLAGS_skins="${CPPFLAGS_skins} -O2 -fno-rtti -Imodules/gui/skins -Imodules/gui/skins/src -Imodules/gui/skins/win32 -Imodules/gui/skins/controls"
  2315.     LDFLAGS_skins="${LDFLAGS_skins} -lstdc++ -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32 -lmsimg32"
  2316.   fi
  2317. fi
  2318.  
  2319. dnl
  2320. dnl  Gtk+ module
  2321. dnl
  2322. AC_ARG_ENABLE(gtk,
  2323.   [  --enable-gtk            Gtk+ support (default enabled)])
  2324. if test "x${enable_gtk}" != "xno"
  2325. then
  2326.   GTK_PATH="${PATH}"
  2327.   AC_ARG_WITH(gtk-config-path,
  2328.     [    --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
  2329.     [ if test "x${with_gtk_config_path}" != "xno"
  2330.       then
  2331.         GTK_PATH="${with_gtk_config_path}:${PATH}"
  2332.       fi ])
  2333.   # look for gtk-config
  2334.   AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
  2335.   GTK_CONFIG=${GTK12_CONFIG}
  2336.   if test "x${GTK_CONFIG}" = "xno"
  2337.   then
  2338.     AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
  2339.   fi
  2340.   if test "x${GTK_CONFIG}" != "xno"
  2341.   then
  2342.     if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
  2343.     then
  2344.       AC_MSG_ERROR([Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-gtk.])
  2345.     fi
  2346.     if test "x${SYS}" != "xmingw32"; then
  2347.       CFLAGS_gtk="${CFLAGS_gtk} `${GTK_CONFIG} --cflags gtk gthread`"
  2348.       LDFLAGS_gtk="${LDFLAGS_gtk} `${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`"
  2349.     else
  2350.       CFLAGS_gtk="${CFLAGS_gtk} `${GTK_CONFIG} --cflags gtk`"
  2351.       LDFLAGS_gtk="${LDFLAGS_gtk} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
  2352.     fi
  2353.     # now look for the gtk.h header
  2354.     CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gtk}"
  2355.     ac_cv_gtk_headers=yes
  2356.     AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
  2357.       ac_cv_gtk_headers=no
  2358.       echo "Cannot find gtk development headers."
  2359.     ])
  2360.     if test "x${ac_cv_gtk_headers}" = "xyes"
  2361.     then
  2362.       PLUGINS="${PLUGINS} gtk"
  2363.       if test "x${SYS}" != "xmingw32"; then
  2364.         NEED_GTK_MAIN=yes
  2365.       fi
  2366.       ALIASES="${ALIASES} gvlc"
  2367.     fi
  2368.     CPPFLAGS="${CPPFLAGS_save}"
  2369.   fi
  2370. fi
  2371.  
  2372. dnl
  2373. dnl  Gtk+2 module
  2374. dnl
  2375. AC_ARG_ENABLE(gtk2,
  2376.   [  --enable-gtk2           Gtk2 support (default disabled)])
  2377. if test "x${enable_gtk2}" = "xyes"
  2378. then
  2379.   PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0, gthread-2.0])
  2380.   CFLAGS_gtk2="${CFLAGS_gtk2} ${GTK2_CFLAGS}"
  2381.   LDFLAGS_gtk2="${LDFLAGS_gtk2} ${GTK2_LIBS}"
  2382.   PLUGINS="${PLUGINS} gtk2"
  2383.   if test "x${SYS}" != "xmingw32"; then
  2384.     NEED_GTK2_MAIN=yes
  2385.   fi
  2386. fi
  2387.  
  2388. dnl
  2389. dnl  Familiar module uses Gtk+ library
  2390. dnl
  2391. AC_ARG_ENABLE(familiar,
  2392.   [  --enable-familiar       Familiar Gtk+ support (default disabled)])
  2393. if test "x${enable_familiar}" = "xyes"
  2394. then
  2395.   GTK_PATH="${PATH}"
  2396.   AC_ARG_WITH(gtk-config-path,
  2397.     [    --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
  2398.     [ if test "x${with_gtk_config_path}" != "xno"
  2399.       then
  2400.         GTK_PATH="${with_gtk_config_path}:${PATH}"
  2401.       fi ])
  2402.   # look for gtk-config
  2403.   AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, ${GTK_PATH})
  2404.   GTK_CONFIG=${GTK12_CONFIG}
  2405.   if test "x${GTK_CONFIG}" = "xno"
  2406.   then
  2407.     AC_PATH_PROG(GTK_CONFIG, gtk-config, no, ${GTK_PATH})
  2408.   fi
  2409.   # check for cross-compiling
  2410.   GTK_PREFIX=
  2411.   AC_ARG_WITH(gtk-prefix,
  2412.     [    --with-gtk-prefix=PATH path to libgtk (needed for cross-compiling),
  2413.                           e.g use as:
  2414.                           --with-gtk-prefix=/usr/local/arm/2.95.3/arm-linux/usr)],[],[])
  2415.   if test "x${with_gtk_prefix}" != "xno" -a "x${with_gtk_prefix}" != "x"
  2416.   then
  2417.     GTK_PREFIX="--prefix=$with_gtk_prefix"
  2418.   fi
  2419.   if test "x${GTK_CONFIG}" != "xno"
  2420.   then
  2421.     if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
  2422.     then
  2423.       AC_MSG_ERROR([Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-familiar.])
  2424.     fi
  2425.     CFLAGS_familiar="${CFLAGS_familiar} `${GTK_CONFIG} ${GTK_PREFIX} --cflags gtk gthread`"
  2426.     LDFLAGS_familiar="${LDFLAGS_familiar} `${GTK_CONFIG} ${GTK_PREFIX} --libs gtk gthread | sed 's,-rdynamic,,'`"
  2427.     # now look for the gtk.h header
  2428.     CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_familiar}"
  2429.     ac_cv_gtk_headers=yes
  2430.     AC_CHECK_HEADERS(gtk/gtk.h glib.h gdk/gdk.h, , [
  2431.       ac_cv_gtk_headers=no
  2432.       echo "Cannot find gtk development headers."
  2433.     ])
  2434.     if test "x${ac_cv_gtk_headers}" = "xyes"
  2435.     then
  2436.       PLUGINS="${PLUGINS} familiar"
  2437.     fi
  2438.     CPPFLAGS="${CPPFLAGS_save}"
  2439.  
  2440.     # now look for gpe support
  2441.     AC_ARG_WITH(gpe-prefix,
  2442.     [    --with-gpe-prefix=PATH gpe installation path prefix (default search in \$PATH)],[],[])
  2443.     if test "x$with_gpe_prefix" != "xno"  -a "x$with_gpe_prefix" != "x"
  2444.     then
  2445.       CFLAGS_gpe="-I$with_gpe_prefix/include"
  2446.       LDFLAGS_gpe="-lXi -lgdk_pixbuf -L$with_gpe_prefix/lib -lgpewidget"
  2447.       # now look for gpe/init.h header file
  2448.       CFLAGS_save=$CFLAGS
  2449.       LDFLAGS_save=$LDFLAGS
  2450.       CFLAGS="${CFLAGS_familiar} ${CFLAGS_gpe}"
  2451.       LDFLAGS="${LDFLAGS_familiar} ${LDFLAGS_gpe}"
  2452.       CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_familiar} ${CFLAGS_gpe}"
  2453.       ac_cv_gpe_headers=yes
  2454.       AC_CHECK_HEADERS(gpe/init.h, ,
  2455.         [ ac_cv_gpe_headers=no
  2456.           AC_MSG_ERROR([Cannot find development headers for libgpewidget...]) ])
  2457.       CFLAGS=$CFLAGS_save
  2458.       LDFLAGS=$LDFLAG_save
  2459.       if test "x${ac_cv_gpe_headers}" = "xyes"
  2460.       then
  2461.         CFLAGS_familiar="${CFLAGS_familiar} ${CFLAGS_gpe}"
  2462.         LDFLAGS_familiar="${LDFLAGS_familiar} ${LDFLAGS_gpe}"
  2463.       fi
  2464.     else
  2465.       NEED_GTK_MAIN=yes
  2466.     fi # end gpe support
  2467.   fi # end gtk+ support
  2468. fi
  2469.  
  2470. dnl
  2471. dnl  Gnome module
  2472. dnl
  2473. AC_ARG_ENABLE(gnome,
  2474.   [  --enable-gnome          Gnome interface support (default disabled)],
  2475.   [if test "x${enable_gnome}" = "xyes"; then
  2476.     # look for gnome-config
  2477.     AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
  2478.     if test -x ${GNOME_CONFIG}
  2479.     then
  2480.        CFLAGS_gnome="${CFLAGS_gnome} `${GNOME_CONFIG} --cflags gtk gnomeui`"
  2481.        LDFLAGS_gnome="${LDFLAGS_gnome} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
  2482.     fi
  2483.     # now look for the gnome.h header
  2484.     CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_gnome}"
  2485.     AC_CHECK_HEADERS(gnome.h, [
  2486.       PLUGINS="${PLUGINS} gnome"
  2487.       NEED_GTK_MAIN=yes
  2488.       NEED_GNOME_MAIN=yes
  2489.       ALIASES="${ALIASES} gnome-vlc"
  2490.       dnl We need this because of some moronic gnomesupport.h flavours
  2491.       AC_MSG_CHECKING(for strndup in gnome.h)
  2492.       AC_EGREP_HEADER(strndup,gnome.h,[
  2493.         AC_MSG_RESULT(yes)
  2494.         AC_DEFINE(STRNDUP_IN_GNOME_H, 1,
  2495.                   Define if <gnome.h> defines strndup.)],[
  2496.         AC_MSG_RESULT(no)])
  2497.      ],[
  2498.       AC_MSG_ERROR([Can't find gnome headers. Please install the gnome
  2499. developement tools or remove the --enable-gnome option])
  2500.      ])
  2501.     CPPFLAGS="${CPPFLAGS_save}"
  2502.   fi])
  2503.  
  2504. dnl
  2505. dnl  Gnome2 module
  2506. dnl
  2507. AC_ARG_ENABLE(gnome2,
  2508.   [  --enable-gnome2         Gnome2 support (default disabled)])
  2509. if test "x${enable_gnome2}" = "xyes"
  2510. then
  2511.   PKG_CHECK_MODULES(GNOME2, [libgnomeui-2.0])
  2512.   CFLAGS_gnome2="${CFLAGS_gnome2} ${GNOME2_CFLAGS}"
  2513.   LDFLAGS_gnome2="${LDFLAGS_gnome2} ${GNOME2_LIBS}"
  2514.   PLUGINS="${PLUGINS} gnome2"
  2515.   if test "x${SYS}" != "xmingw32"; then
  2516.     NEED_GNOME2_MAIN=yes
  2517.   fi
  2518. fi
  2519.  
  2520. dnl
  2521. dnl  wxWindows module
  2522. dnl
  2523. AC_ARG_ENABLE(wxwindows,
  2524.   [  --enable-wxwindows      wxWindows support (default enabled)])
  2525. if test "x${enable_wxwindows}" != "xno"
  2526. then
  2527.   WXWINDOWS_PATH="${PATH}"
  2528.   AC_ARG_WITH(wx-config-path,
  2529.     [    --with-wx-config-path=PATH wx-config path (default search in \$PATH)],
  2530.     [ if test "x${with_wx_config_path}" != "xno"
  2531.       then
  2532.         WXWINDOWS_PATH="${with_wx_config_path}:${PATH}"
  2533.       fi ])
  2534.   # look for wx-config
  2535.   AC_PATH_PROG(WX_CONFIG, wx-config, no, ${WXWINDOWS_PATH})
  2536.   if test "x${WX_CONFIG}" != "xno"
  2537.   then
  2538.     if expr 2.3.0 \> `${WX_CONFIG} --version` >/dev/null
  2539.     then
  2540.       AC_MSG_ERROR([Your development package for wxWindows is too old, you need at least version 2.3.0. Please upgrade and try again. Alternatively you can also configure with --disable-wxwindows.])
  2541.     fi
  2542.     CXXFLAGS_wxwindows="${CXXFLAGS_wxwindows} `${WX_CONFIG} --cxxflags`"
  2543.     LDFLAGS_wxwindows="${LDFLAGS_wxwindows} `${WX_CONFIG} --libs`"
  2544.     # now look for the wxprec.h header
  2545.     CPPFLAGS="${CPPFLAGS_save} ${CXXFLAGS_wxwindows}"
  2546.     ac_cv_wx_headers=yes
  2547.     AC_CHECK_HEADERS(wx/wxprec.h, , [
  2548.       ac_cv_wx_headers=no
  2549.       echo "Cannot find wxWindows development headers."
  2550.     ])
  2551.     if test "x${ac_cv_wx_headers}" = "xyes"
  2552.     then
  2553.       PLUGINS="${PLUGINS} wxwindows"
  2554.       ALIASES="${ALIASES} wxvlc"
  2555.     fi
  2556.     CPPFLAGS="${CPPFLAGS_save}"
  2557.   fi
  2558. fi
  2559.  
  2560. dnl
  2561. dnl  Qt module
  2562. dnl
  2563. AC_ARG_ENABLE(qt,
  2564.   [  --enable-qt             Qt interface support (default disabled)],
  2565.   [if test "x${enable_qt}" = "xyes"; then
  2566.      PLUGINS="${PLUGINS} qt"
  2567.      ALIASES="${ALIASES} qvlc"
  2568.      LDFLAGS_qt="${LDFLAGS_qt} -L${QTDIR}/lib"
  2569.      LDFLAGS="${LDFLAGS_save} ${LDFLAGS_qt}"
  2570.      AC_CHECK_LIB(qt-mt,main,[
  2571.        LDFLAGS_qt="${LDFLAGS_qt} -lqt-mt"
  2572.      ],[
  2573.        AC_CHECK_LIB(qt,main,[
  2574.          LDFLAGS_qt="${LDFLAGS_qt} -lqt"
  2575.        ])
  2576.      ])
  2577.      LDFLAGS="${LDFLAGS_save}"
  2578.      CPPFLAGS_qt="${CPPFLAGS_qt} -I/usr/include/qt3 -I/usr/include/qt -I${QTDIR}/include"
  2579.      if test -x ${QTDIR}/bin/moc
  2580.      then
  2581.        MOC=${QTDIR}/bin/moc
  2582.      else
  2583.        MOC=moc
  2584.      fi
  2585.    fi])
  2586.  
  2587. dnl
  2588. dnl  KDE module
  2589. dnl
  2590. AC_ARG_ENABLE(kde,
  2591.   [  --enable-kde            KDE interface support (default disabled)],
  2592.   [if test "x${enable_kde}" = "xyes"; then
  2593.      PLUGINS="${PLUGINS} kde"
  2594.      ALIASES="${ALIASES} kvlc"
  2595.      LDFLAGS_kde="${LDFLAGS_kde} -L${KDEDIR}/lib"
  2596.      dnl Check for -lkfile (only in KDE 2) or -lkdeui -lkio (KDE 3)
  2597.      LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
  2598.      AC_CHECK_LIB(kfile,main,[
  2599.        LDFLAGS_kde="${LDFLAGS_kde} -lkfile"
  2600.      ])
  2601.      LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
  2602.      AC_CHECK_LIB(kdeui,main,[
  2603.        LDFLAGS_kde="${LDFLAGS_kde} -lkdeui"
  2604.      ])
  2605.      LDFLAGS="${LDFLAGS_save} ${LDFLAGS_kde}"
  2606.      AC_CHECK_LIB(kio,main,[
  2607.        LDFLAGS_kde="${LDFLAGS_kde} -lkio"
  2608.      ])
  2609.      LDFLAGS="${LDFLAGS_save}"
  2610.      CPPFLAGS_kde="${CPPFLAGS_kde} -I/usr/include/kde -I/usr/include/qt3 -I/usr/include/qt"
  2611.      CPPFLAGS_kde="${CPPFLAGS_kde} -I${KDEDIR}/include -I${QTDIR}/include"
  2612.      if test -x ${QTDIR}/bin/moc
  2613.      then
  2614.        MOC=${QTDIR}/bin/moc
  2615.      else
  2616.        MOC=moc
  2617.      fi
  2618.    fi])
  2619.  
  2620. dnl
  2621. dnl  Opie QT embedded module
  2622. dnl
  2623. AC_ARG_ENABLE(opie,
  2624.   [  --enable-opie           Qt embedded interface support (default disabled)],
  2625.   [if test "x${enable_opie}" = "xyes"; then
  2626.      AC_ARG_WITH(qte,
  2627.      [    --with-qte=PATH       Qt Embedded headers and libraries])
  2628.      if test "x${with_qte}" != "xno" -a "x${with_qte}" != "x"
  2629.      then
  2630.        LDFLAGS_qte="-L${with_qte}/lib `echo -L${with_qte}/lib | sed 's,opt/QtPalmtop,usr,'` -ljpeg -lqte"
  2631.        CPPFLAGS_qte="-I${with_qte}/include `echo -I${with_qte}/include | sed 's,opt/QtPalmtop,usr,'` -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti"
  2632.      else
  2633.        LDFLAGS_qte="-L${QTDIR}/lib `echo -L${QTDIR}/lib | sed 's,opt/QtPalmtop,usr,'`"
  2634.        CPPFLAGS_qte="-I${QTDIR}/include `echo -I${QTDIR}/include | sed 's,opt/QtPalmtop,usr,'`"
  2635.      fi
  2636.      CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_qte}"
  2637.      AC_CHECK_HEADERS(qt.h jpeglib.h, ,[
  2638.        AC_MSG_ERROR([echo "Cannot find QT Embedded development headers."])
  2639.      ] )
  2640.      CPPFLAGS="${CPPFLAGS_save}"
  2641.  
  2642.      PLUGINS="${PLUGINS} opie"
  2643.      NEED_QTE_MAIN=yes
  2644.      LDFLAGS_opie="${LDFLAGS_opie} -lqpe ${LDFLAGS_qte}"
  2645.      CPPFLAGS_opie="${CPPFLAGS_opie} ${CPPFLAGS_qte}"
  2646.      if test "x${with_qte}" != "xno" -a "x${with_qte}" != "x"
  2647.      then
  2648.        MOC=${with_qte}/bin/moc
  2649.      else
  2650.        MOC=${QTDIR}/bin/moc
  2651.      fi
  2652.    fi])
  2653.  
  2654. dnl
  2655. dnl  MacOS X module
  2656. dnl
  2657. AC_ARG_ENABLE(macosx,
  2658.   [  --enable-macosx         MacOS X support (default enabled on MacOS X)],
  2659.   [if test "x${enable_macosx}" = "xyes"
  2660.    then
  2661.      BUILTINS="${BUILTINS} macosx"
  2662.      LDFLAGS_macosx="${LDFLAGS_macosx} -framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC"
  2663.    fi],
  2664.   [AC_CHECK_HEADERS(Cocoa/Cocoa.h,
  2665.      BUILTINS="${BUILTINS} macosx"
  2666.      LDFLAGS_macosx="${LDFLAGS_macosx} -framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC"
  2667.    )])
  2668.  
  2669. dnl
  2670. dnl  QNX RTOS module
  2671. dnl
  2672. AC_ARG_ENABLE(qnx,
  2673.   [  --enable-qnx            QNX RTOS support (default enabled on QNX RTOS)])
  2674.     if test "x${enable_qnx}" != "xno"
  2675.     then
  2676.       AC_CHECK_HEADERS(Ph.h, [
  2677.         PLUGINS="${PLUGINS} qnx"
  2678.         LDFLAGS_qnx="${LDFLAGS_qnx} -lasound -lph"
  2679.       ])
  2680.     fi
  2681.  
  2682. dnl
  2683. dnl  Windows native interface module, built with Borland C++ Builder
  2684. dnl
  2685. AC_ARG_ENABLE(intfwin,
  2686. [  --enable-intfwin        Win32 interface support (default disabled)],
  2687. [ if test "x${enable_intfwin}" != "xno"
  2688.   then
  2689.     AC_CHECK_TOOL(BPR2MAK, bpr2mak, AC_ERROR(bpr2mak not found))
  2690.     AC_CHECK_TOOL(BCMAKE, bcmake, AC_ERROR(bcmake not found))
  2691.     PLUGINS="${PLUGINS} win32"
  2692.   fi ])
  2693.  
  2694. dnl
  2695. dnl  ncurses module
  2696. dnl
  2697. AC_ARG_ENABLE(ncurses,
  2698.   [  --enable-ncurses        ncurses interface support (default disabled)],
  2699.   [if test "x${enable_ncurses}" = "xyes"; then
  2700.      PLUGINS="${PLUGINS} ncurses"
  2701.      LDFLAGS_ncurses="${LDFLAGS_ncurses} -lncurses"
  2702.    fi])
  2703.  
  2704. dnl
  2705. dnl  XOSD plugin
  2706. dnl
  2707. AC_ARG_ENABLE(xosd,
  2708.   [  --enable-xosd           xosd interface support (default disabled)])
  2709. if test "x${enable_xosd}" = "xyes"
  2710. then
  2711.   AC_CHECK_HEADER(xosd.h, have_xosd="true", have_xosd="false")
  2712.   AC_CHECK_LIB(xosd,xosd_set_offset,
  2713.       AC_DEFINE(HAVE_XOSD_VERSION_1, 1, Define if <xosd.h> is 1.0.x),
  2714.     AC_CHECK_LIB(xosd,xosd_set_horizontal_offset,
  2715.         AC_DEFINE(HAVE_XOSD_VERSION_2, 1, Define if <xosd.h> is 2.0.x),
  2716.       AC_TRY_COMPILE([#include <xosd.h>],
  2717.          [void foo() { xosd_init("foo","bar",12,XOSD_top,2,12,42); }],,
  2718.           AC_DEFINE(HAVE_XOSD_VERSION_0, 1, Define if <xosd.h> is pre-1.0.0))))
  2719.   if test "x${have_xosd}" = "xtrue"
  2720.   then
  2721.     PLUGINS="${PLUGINS} xosd"
  2722.     LDFLAGS_xosd="${LDFLAGS_xosd} -lxosd"
  2723.   fi
  2724. fi
  2725.  
  2726. dnl
  2727. dnl  SLP access plugin
  2728. dnl
  2729. AC_ARG_ENABLE(slp,
  2730.   [  --enable-slp            SLP service discovery support (default enabled)])
  2731. if test "x${enable_slp}" != "xno"
  2732. then
  2733.   AC_ARG_WITH(slp,
  2734.   [    --with-slp=PATH       libslp headers and libraries])
  2735.   if test "x${with_slp}" = x
  2736.   then
  2737.     AC_CHECK_HEADER(slp.h, have_slp="true", have_slp="false")
  2738.     if test "x${have_slp}" = "xtrue"
  2739.     then
  2740.       PLUGINS="${PLUGINS} slp"
  2741.       LDFLAGS_slp="-lslp ${LDFLAGS_slp}"
  2742.     fi
  2743.   else
  2744.     AC_MSG_CHECKING(for slp headers in ${with_slp})
  2745.     if test -f ${with_slp}/slp.h
  2746.     then
  2747.       dnl  Use ${with_slp}/libslp/slp.h
  2748.       AC_MSG_RESULT(yes)
  2749.       PLUGINS="${PLUGINS} slp"
  2750.       LDFLAGS_slp="-L${with_slp} -lslp ${LDFLAGS_slp}"
  2751.       CPPFLAGS_slp="${CPPFLAGS_slp} -I${with_slp}"
  2752.     else
  2753.       dnl  No libslp could be found, sorry
  2754.       AC_MSG_RESULT(no)
  2755.       AC_MSG_ERROR([cannot find ${with_slp}/slp.h])
  2756.     fi
  2757.   fi
  2758. fi
  2759.  
  2760. dnl
  2761. dnl  Lirc plugin
  2762. dnl
  2763. AC_ARG_ENABLE(lirc,
  2764.   [  --enable-lirc           lirc support (default disabled)])
  2765. if test "x${enable_lirc}" = "xyes"
  2766. then
  2767.   AC_CHECK_HEADER(lirc/lirc_client.h, AC_CHECK_LIB(lirc_client, lirc_init, have_lirc="true", have_lirc="false"),have_lirc="false")
  2768.   if test "x${have_lirc}" = "xtrue"
  2769.   then
  2770.     PLUGINS="${PLUGINS} lirc"
  2771.     LDFLAGS_lirc="${LDFLAGS_lirc} -llirc_client"
  2772.   fi
  2773. fi
  2774.  
  2775. AC_ARG_WITH(,[Misc options:])
  2776.  
  2777. dnl
  2778. dnl  Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling
  2779. dnl
  2780. dnl  We give the user the opportunity to specify
  2781. dnl  --with-words=big or --with-words=little ; otherwise, try to guess
  2782. dnl
  2783. AC_ARG_WITH(words,
  2784.   [  --with-words=endianness set endianness (big or little)])
  2785.   case "x${with_words}" in
  2786.     xbig)
  2787.       ac_cv_c_bigendian=yes
  2788.       ;;
  2789.     xlittle)
  2790.       ac_cv_c_bigendian=no
  2791.       ;;
  2792.     *)
  2793.       dnl  Try to guess endianness by matching patterns on a compiled
  2794.       dnl  binary, by looking for an ASCII or EBCDIC string
  2795.       AC_CACHE_CHECK([whether the byte order is big-endian],
  2796.         [ac_cv_c_bigendian],
  2797.         [ac_cv_c_bigendian="unknown"
  2798.         [cat >conftest.c <<EOF
  2799.         short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
  2800.         short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
  2801.         void _a(void) { char*s = (char*)am; s = (char *)ai; }
  2802.         short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
  2803.         short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
  2804.         void _e(void) { char*s = (char*)em; s = (char*)ei; }
  2805.         int main(void) { _a(); _e(); return 0; }
  2806. EOF
  2807.         ]
  2808.         if test -f conftest.c
  2809.         then
  2810.           if ${CC-cc} -c conftest.c -o conftest.o >>config.log 2>&1 \
  2811.               && test -f conftest.o
  2812.           then
  2813.             if test "`strings conftest.o | grep BIGenDianSyS`"
  2814.             then
  2815.               ac_cv_c_bigendian="yes"
  2816.             fi
  2817.             if test "`strings conftest.o | grep LiTTleEnDian`"
  2818.             then
  2819.               ac_cv_c_bigendian="no"
  2820.             fi
  2821.           fi
  2822.         fi
  2823.       ])
  2824.       if test "x${ac_cv_c_bigendian}" = "xunknown"
  2825.       then
  2826.         AC_MSG_ERROR([Could not guess endianness, please use --with-words])
  2827.       fi
  2828.       ;;
  2829.   esac
  2830. dnl  Now we know what to use for endianness, just put it in the header
  2831. if test "${ac_cv_c_bigendian}" = "yes"
  2832. then
  2833.   AC_DEFINE(WORDS_BIGENDIAN, 1, big endian system)
  2834. fi
  2835.  
  2836. dnl
  2837. dnl  Mozilla plugin
  2838. dnl
  2839. mozilla=false
  2840. AC_ARG_ENABLE(mozilla,
  2841.   [  --enable-mozilla        build a vlc-based Mozilla plugin (default disabled)])
  2842. if test "x${enable_mozilla}" = "xyes"
  2843. then
  2844.   AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no)
  2845.   if test "x${MOZILLA_CONFIG}" != "xno"
  2846.   then
  2847.     if test "x${SYS}" != "xmingw32"; then
  2848.       LDFLAGS="${LDFLAGS_save} -L${x_libraries}"
  2849.       AC_CHECK_LIB(Xt,XtStrings,[
  2850.         LDFLAGS_mozilla="${LDFLAGS_mozilla} -L${x_libraries} -lXt"
  2851.       ])
  2852.       LDFLAGS="${LDFLAGS_save}"
  2853.     fi
  2854.     mozilla=:
  2855.     dnl Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150490
  2856.     [CPPFLAGS_mozilla="${CPPFLAGS_mozilla} `${MOZILLA_CONFIG} --cflags plugin xpcom java | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`"]
  2857.     #[CPPFLAGS_mozilla="${CPPFLAGS_mozilla} `${MOZILLA_CONFIG} --cflags plugin xpcom java --defines | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`"]
  2858.     LDFLAGS_mozilla="${LDFLAGS_mozilla} `${MOZILLA_CONFIG} --libs plugin xpcom`"
  2859.     dnl Not necessarily in ${PATH}
  2860.     if test "x${XPIDL}" = "x" -o ! -x "${XPIDL}"
  2861.     then
  2862.       XPIDL="/usr/lib/mozilla/xpidl"
  2863.     fi
  2864.   fi
  2865. fi
  2866. AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
  2867.  
  2868. dnl
  2869. dnl  test plugins
  2870. dnl
  2871. AC_ARG_ENABLE(testsuite,
  2872.   [  --enable-testsuite      build test modules (default disabled)])
  2873. if test "x${enable_testsuite}" = "xyes"
  2874. then
  2875.   TESTS="test1 test2 test3 test4"
  2876.  
  2877.   dnl  we define those so that bootstrap sets the right linker
  2878.   CXXFLAGS_test2="${CXXFLAGS_test2}"
  2879.   OBJCFLAGS_test3="${OBJCFLAGS_test3}"
  2880.   dnl  this one is needed until automake knows what to do
  2881.   LDFLAGS_test3="${LDFLAGS_test3} -lobjc"
  2882.  
  2883.   PLUGINS="${PLUGINS} ${TESTS}"
  2884.   #BUILTINS="${BUILTINS} ${TESTS}"
  2885. fi
  2886.  
  2887. dnl
  2888. dnl  gtk_main plugin
  2889. dnl
  2890. if test "x${NEED_GTK_MAIN}" != "xno"
  2891. then
  2892.     PLUGINS="${PLUGINS} gtk_main"
  2893.     CFLAGS_gtk="${CFLAGS_gtk} -DNEED_GTK_MAIN"
  2894.     CFLAGS_familiar="${CFLAGS_familiar} -DNEED_GTK_MAIN"
  2895.     CFLAGS_gtk_main="${CFLAGS_gtk_main} ${CFLAGS_gtk} ${CFLAGS_familiar}"
  2896.     LDFLAGS_gtk_main="${LDFLAGS_gtk_main} ${LDFLAGS_gtk} ${LDFLAGS_familiar}"
  2897. fi
  2898.  
  2899. if test "x${NEED_GNOME_MAIN}" != "xno"
  2900. then
  2901.     PLUGINS="${PLUGINS} gnome_main"
  2902.     CFLAGS_gnome_main="${CFLAGS_gnome_main} ${CFLAGS_gtk} ${CFLAGS_familiar} ${CFLAGS_gnome}"
  2903.     LDFLAGS_gnome_main="${LDFLAGS_gnome_main} ${LDFLAGS_gtk} ${LDFLAGS_familiar} ${LDFLAGS_gnome}"
  2904. fi
  2905.  
  2906. if test "x${NEED_GTK2_MAIN}" != "xno"
  2907. then
  2908.     PLUGINS="${PLUGINS} gtk2_main"
  2909.     CFLAGS_gtk2="${CFLAGS_gtk2} -DNEED_GTK2_MAIN"
  2910.     CFLAGS_gtk2_main="${CFLAGS_gtk2_main} ${CFLAGS_gtk2}"
  2911.     LDFLAGS_gtk2_main="${LDFLAGS_gtk2_main} ${LDFLAGS_gtk2}"
  2912. fi
  2913.  
  2914. if test "x${NEED_GNOME2_MAIN}" != "xno"
  2915. then
  2916.     PLUGINS="${PLUGINS} gnome2_main"
  2917.     CFLAGS_gnome2_main="${CFLAGS_gnome2_main} ${CFLAGS_gtk2} ${CFLAGS_gnome2}"
  2918.     LDFLAGS_gnome2_main="${LDFLAGS_gnome2_main} ${LDFLAGS_gtk2} ${LDFLAGS_gnome2}"
  2919. fi
  2920.  
  2921. dnl
  2922. dnl  qte_main plugin
  2923. dnl
  2924. if test "x${NEED_QTE_MAIN}" != "xno"
  2925. then
  2926.     PLUGINS="${PLUGINS} qte_main"
  2927.     CPPFLAGS_qte="${CPPFLAGS_qte} -DNEED_QTE_MAIN"
  2928.     CPPFLAGS_opie="${CPPFLAGS_opie} -DNEED_QTE_MAIN"
  2929.     CFLAGS_vout_sdl="${CFLAGS_vout_sdl} -DNEED_QTE_MAIN"
  2930.     CPPFLAGS_qte_main="${CFLAGS_qte_main} ${CPPFLAGS_qte}"
  2931.     LDFLAGS_qte_main="${LDFLAGS_qte_main} ${LDFLAGS_qte}"
  2932. fi
  2933.  
  2934.  
  2935. dnl
  2936. dnl  Plugin and builtin checks
  2937. dnl
  2938. builtin_support=false
  2939. plugin_support=:
  2940.  
  2941. dnl Support for plugins - this must be AT THE END
  2942. AC_ARG_ENABLE(plugins,
  2943.   [  --disable-plugins       make all plugins built-in (default plugins enabled)],
  2944.   [if test "x${enable_plugins}" = "xno"
  2945.    then
  2946.      plugin_support=false
  2947.    fi])
  2948.  
  2949. dnl Automagically disable plugins if there is no system support for
  2950. dnl dynamically loadable files (.so, .dll, .dylib).
  2951. dnl don't forget vlc-win32 still can load .dll as plugins
  2952. if test "x${ac_cv_header_dlfcn_h}" = "xno" -a "x${ac_cv_header_image_h}" = "xno" -a "x${SYS}" != "xmingw32"
  2953. then
  2954.   echo "*** Your system doesn't have plugin support. All plugins will be built"
  2955.   echo "statically."
  2956.   plugin_support=false
  2957. fi
  2958.  
  2959. dnl Export automake variables
  2960. if ${plugin_support}
  2961. then
  2962.   for plugin in `echo ${PLUGINS}`
  2963.   do
  2964.     eval "${plugin}_plugin=yes"
  2965.   done
  2966. else
  2967.   BUILTINS="${BUILTINS} ${PLUGINS}"
  2968.   PLUGINS=
  2969. fi
  2970. AM_CONDITIONAL(HAVE_PLUGINS, ${plugin_support})
  2971.  
  2972. [if echo "${BUILTINS}" | grep '[^ ]' >/dev/null 2>&1
  2973. then
  2974.   builtin_support=:
  2975.   for builtin in `echo ${BUILTINS}`
  2976.   do
  2977.     eval "${builtin}_builtin=yes"
  2978.   done
  2979. fi]
  2980. AM_CONDITIONAL(HAVE_BUILTINS, ${builtin_support})
  2981.  
  2982. AM_CONDITIONAL(access_file_plugin, test x$access_file_plugin = xyes)
  2983. AM_CONDITIONAL(access_file_builtin, test x$access_file_builtin = xyes)
  2984. AM_CONDITIONAL(access_directory_plugin, test x$access_directory_plugin = xyes)
  2985. AM_CONDITIONAL(access_directory_builtin, test x$access_directory_builtin = xyes)
  2986. AC_SUBST(LDFLAGS_access_udp)
  2987. AM_CONDITIONAL(access_udp_plugin, test x$access_udp_plugin = xyes)
  2988. AM_CONDITIONAL(access_udp_builtin, test x$access_udp_builtin = xyes)
  2989. AC_SUBST(LDFLAGS_access_http)
  2990. AM_CONDITIONAL(access_http_plugin, test x$access_http_plugin = xyes)
  2991. AM_CONDITIONAL(access_http_builtin, test x$access_http_builtin = xyes)
  2992. AC_SUBST(LDFLAGS_access_ftp)
  2993. AM_CONDITIONAL(access_ftp_plugin, test x$access_ftp_plugin = xyes)
  2994. AM_CONDITIONAL(access_ftp_builtin, test x$access_ftp_builtin = xyes)
  2995. AC_SUBST(CPPFLAGS_slp)
  2996. AC_SUBST(LDFLAGS_slp)
  2997. AM_CONDITIONAL(slp_plugin, test x$slp_plugin = xyes)
  2998. AM_CONDITIONAL(slp_builtin, test x$slp_builtin = xyes)
  2999. AC_SUBST(CPPFLAGS_dvd)
  3000. AC_SUBST(LDFLAGS_dvd)
  3001. AM_CONDITIONAL(dvd_plugin, test x$dvd_plugin = xyes)
  3002. AM_CONDITIONAL(dvd_builtin, test x$dvd_builtin = xyes)
  3003. AC_SUBST(CPPFLAGS_dvdplay)
  3004. AC_SUBST(LDFLAGS_dvdplay)
  3005. AM_CONDITIONAL(dvdplay_plugin, test x$dvdplay_plugin = xyes)
  3006. AM_CONDITIONAL(dvdplay_builtin, test x$dvdplay_builtin = xyes)
  3007. AC_SUBST(CPPFLAGS_dvdread)
  3008. AC_SUBST(LDFLAGS_dvdread)
  3009. AM_CONDITIONAL(dvdread_plugin, test x$dvdread_plugin = xyes)
  3010. AM_CONDITIONAL(dvdread_builtin, test x$dvdread_builtin = xyes)
  3011. AC_SUBST(LDFLAGS_access_mms)
  3012. AM_CONDITIONAL(access_mms_plugin, test x$access_mms_plugin = xyes)
  3013. AM_CONDITIONAL(access_mms_builtin, test x$access_mms_builtin = xyes)
  3014. AM_CONDITIONAL(satellite_plugin, test x$satellite_plugin = xyes)
  3015. AM_CONDITIONAL(satellite_builtin, test x$satellite_builtin = xyes)
  3016. AM_CONDITIONAL(v4l_plugin, test x$v4l_plugin = xyes)
  3017. AM_CONDITIONAL(v4l_builtin, test x$v4l_builtin = xyes)
  3018. AC_SUBST(LDFLAGS_vcd)
  3019. AM_CONDITIONAL(vcd_plugin, test x$vcd_plugin = xyes)
  3020. AM_CONDITIONAL(vcd_builtin, test x$vcd_builtin = xyes)
  3021. AM_CONDITIONAL(access_output_dummy_plugin, test x$access_output_dummy_plugin = xyes)
  3022. AM_CONDITIONAL(access_output_dummy_builtin, test x$access_output_dummy_builtin = xyes)
  3023. AM_CONDITIONAL(access_output_file_plugin, test x$access_output_file_plugin = xyes)
  3024. AM_CONDITIONAL(access_output_file_builtin, test x$access_output_file_builtin = xyes)
  3025. AC_SUBST(LDFLAGS_access_output_udp)
  3026. AM_CONDITIONAL(access_output_udp_plugin, test x$access_output_udp_plugin = xyes)
  3027. AM_CONDITIONAL(access_output_udp_builtin, test x$access_output_udp_builtin = xyes)
  3028. AM_CONDITIONAL(access_output_http_plugin, test x$access_output_http_plugin = xyes)
  3029. AM_CONDITIONAL(access_output_http_builtin, test x$access_output_http_builtin = xyes)
  3030. AM_CONDITIONAL(trivial_channel_mixer_plugin, test x$trivial_channel_mixer_plugin = xyes)
  3031. AM_CONDITIONAL(trivial_channel_mixer_builtin, test x$trivial_channel_mixer_builtin = xyes)
  3032. AC_SUBST(LDFLAGS_headphone_channel_mixer)
  3033. AM_CONDITIONAL(headphone_channel_mixer_plugin, test x$headphone_channel_mixer_plugin = xyes)
  3034. AM_CONDITIONAL(headphone_channel_mixer_builtin, test x$headphone_channel_mixer_builtin = xyes)
  3035. AM_CONDITIONAL(float32tos16_plugin, test x$float32tos16_plugin = xyes)
  3036. AM_CONDITIONAL(float32tos16_builtin, test x$float32tos16_builtin = xyes)
  3037. AM_CONDITIONAL(float32tos8_plugin, test x$float32tos8_plugin = xyes)
  3038. AM_CONDITIONAL(float32tos8_builtin, test x$float32tos8_builtin = xyes)
  3039. AM_CONDITIONAL(float32tou16_plugin, test x$float32tou16_plugin = xyes)
  3040. AM_CONDITIONAL(float32tou16_builtin, test x$float32tou16_builtin = xyes)
  3041. AM_CONDITIONAL(float32tou8_plugin, test x$float32tou8_plugin = xyes)
  3042. AM_CONDITIONAL(float32tou8_builtin, test x$float32tou8_builtin = xyes)
  3043. AM_CONDITIONAL(a52tospdif_plugin, test x$a52tospdif_plugin = xyes)
  3044. AM_CONDITIONAL(a52tospdif_builtin, test x$a52tospdif_builtin = xyes)
  3045. AC_SUBST(CPPFLAGS_a52tofloat32)
  3046. AC_SUBST(LDFLAGS_a52tofloat32)
  3047. AM_CONDITIONAL(a52tofloat32_plugin, test x$a52tofloat32_plugin = xyes)
  3048. AM_CONDITIONAL(a52tofloat32_builtin, test x$a52tofloat32_builtin = xyes)
  3049. AM_CONDITIONAL(dtstospdif_plugin, test x$dtstospdif_plugin = xyes)
  3050. AM_CONDITIONAL(dtstospdif_builtin, test x$dtstospdif_builtin = xyes)
  3051. AM_CONDITIONAL(fixed32tos16_plugin, test x$fixed32tos16_plugin = xyes)
  3052. AM_CONDITIONAL(fixed32tos16_builtin, test x$fixed32tos16_builtin = xyes)
  3053. AM_CONDITIONAL(s16tofixed32_plugin, test x$s16tofixed32_plugin = xyes)
  3054. AM_CONDITIONAL(s16tofixed32_builtin, test x$s16tofixed32_builtin = xyes)
  3055. AM_CONDITIONAL(fixed32tofloat32_plugin, test x$fixed32tofloat32_plugin = xyes)
  3056. AM_CONDITIONAL(fixed32tofloat32_builtin, test x$fixed32tofloat32_builtin = xyes)
  3057. AM_CONDITIONAL(s16tofloat32_plugin, test x$s16tofloat32_plugin = xyes)
  3058. AM_CONDITIONAL(s16tofloat32_builtin, test x$s16tofloat32_builtin = xyes)
  3059. AM_CONDITIONAL(s16tofloat32swab_plugin, test x$s16tofloat32swab_plugin = xyes)
  3060. AM_CONDITIONAL(s16tofloat32swab_builtin, test x$s16tofloat32swab_builtin = xyes)
  3061. AM_CONDITIONAL(s8tofloat32_plugin, test x$s8tofloat32_plugin = xyes)
  3062. AM_CONDITIONAL(s8tofloat32_builtin, test x$s8tofloat32_builtin = xyes)
  3063. AM_CONDITIONAL(u8tofixed32_plugin, test x$u8tofixed32_plugin = xyes)
  3064. AM_CONDITIONAL(u8tofixed32_builtin, test x$u8tofixed32_builtin = xyes)
  3065. AM_CONDITIONAL(u8tofloat32_plugin, test x$u8tofloat32_plugin = xyes)
  3066. AM_CONDITIONAL(u8tofloat32_builtin, test x$u8tofloat32_builtin = xyes)
  3067. AC_SUBST(CPPFLAGS_mpgatofixed32)
  3068. AC_SUBST(LDFLAGS_mpgatofixed32)
  3069. AM_CONDITIONAL(mpgatofixed32_plugin, test x$mpgatofixed32_plugin = xyes)
  3070. AM_CONDITIONAL(mpgatofixed32_builtin, test x$mpgatofixed32_builtin = xyes)
  3071. AM_CONDITIONAL(trivial_resampler_plugin, test x$trivial_resampler_plugin = xyes)
  3072. AM_CONDITIONAL(trivial_resampler_builtin, test x$trivial_resampler_builtin = xyes)
  3073. AM_CONDITIONAL(ugly_resampler_plugin, test x$ugly_resampler_plugin = xyes)
  3074. AM_CONDITIONAL(ugly_resampler_builtin, test x$ugly_resampler_builtin = xyes)
  3075. AM_CONDITIONAL(linear_resampler_plugin, test x$linear_resampler_plugin = xyes)
  3076. AM_CONDITIONAL(linear_resampler_builtin, test x$linear_resampler_builtin = xyes)
  3077. AM_CONDITIONAL(bandlimited_resampler_plugin, test x$bandlimited_resampler_plugin = xyes)
  3078. AM_CONDITIONAL(bandlimited_resampler_builtin, test x$bandlimited_resampler_builtin = xyes)
  3079. AC_SUBST(LDFLAGS_coreaudio_resampler)
  3080. AM_CONDITIONAL(coreaudio_resampler_plugin, test x$coreaudio_resampler_plugin = xyes)
  3081. AM_CONDITIONAL(coreaudio_resampler_builtin, test x$coreaudio_resampler_builtin = xyes)
  3082. AM_CONDITIONAL(trivial_mixer_plugin, test x$trivial_mixer_plugin = xyes)
  3083. AM_CONDITIONAL(trivial_mixer_builtin, test x$trivial_mixer_builtin = xyes)
  3084. AM_CONDITIONAL(float32_mixer_plugin, test x$float32_mixer_plugin = xyes)
  3085. AM_CONDITIONAL(float32_mixer_builtin, test x$float32_mixer_builtin = xyes)
  3086. AM_CONDITIONAL(spdif_mixer_plugin, test x$spdif_mixer_plugin = xyes)
  3087. AM_CONDITIONAL(spdif_mixer_builtin, test x$spdif_mixer_builtin = xyes)
  3088. AC_SUBST(LDFLAGS_alsa)
  3089. AM_CONDITIONAL(alsa_plugin, test x$alsa_plugin = xyes)
  3090. AM_CONDITIONAL(alsa_builtin, test x$alsa_builtin = xyes)
  3091. AC_SUBST(CFLAGS_arts)
  3092. AC_SUBST(LDFLAGS_arts)
  3093. AM_CONDITIONAL(arts_plugin, test x$arts_plugin = xyes)
  3094. AM_CONDITIONAL(arts_builtin, test x$arts_builtin = xyes)
  3095. AC_SUBST(LDFLAGS_coreaudio)
  3096. AM_CONDITIONAL(coreaudio_plugin, test x$coreaudio_plugin = xyes)
  3097. AM_CONDITIONAL(coreaudio_builtin, test x$coreaudio_builtin = xyes)
  3098. AC_SUBST(CPPFLAGS_aout_directx)
  3099. AM_CONDITIONAL(aout_directx_plugin, test x$aout_directx_plugin = xyes)
  3100. AM_CONDITIONAL(aout_directx_builtin, test x$aout_directx_builtin = xyes)
  3101. AC_SUBST(CFLAGS_esd)
  3102. AC_SUBST(LDFLAGS_esd)
  3103. AM_CONDITIONAL(esd_plugin, test x$esd_plugin = xyes)
  3104. AM_CONDITIONAL(esd_builtin, test x$esd_builtin = xyes)
  3105. AM_CONDITIONAL(aout_file_plugin, test x$aout_file_plugin = xyes)
  3106. AM_CONDITIONAL(aout_file_builtin, test x$aout_file_builtin = xyes)
  3107. AM_CONDITIONAL(oss_plugin, test x$oss_plugin = xyes)
  3108. AM_CONDITIONAL(oss_builtin, test x$oss_builtin = xyes)
  3109. AC_SUBST(CFLAGS_aout_sdl)
  3110. AC_SUBST(LDFLAGS_aout_sdl)
  3111. AM_CONDITIONAL(aout_sdl_plugin, test x$aout_sdl_plugin = xyes)
  3112. AM_CONDITIONAL(aout_sdl_builtin, test x$aout_sdl_builtin = xyes)
  3113. AC_SUBST(LDFLAGS_waveout)
  3114. AM_CONDITIONAL(waveout_plugin, test x$waveout_plugin = xyes)
  3115. AM_CONDITIONAL(waveout_builtin, test x$waveout_builtin = xyes)
  3116. AM_CONDITIONAL(a52_plugin, test x$a52_plugin = xyes)
  3117. AM_CONDITIONAL(a52_builtin, test x$a52_builtin = xyes)
  3118. AM_CONDITIONAL(dts_plugin, test x$dts_plugin = xyes)
  3119. AM_CONDITIONAL(dts_builtin, test x$dts_builtin = xyes)
  3120. AC_SUBST(LDFLAGS_flacdec)
  3121. AM_CONDITIONAL(flacdec_plugin, test x$flacdec_plugin = xyes)
  3122. AM_CONDITIONAL(flacdec_builtin, test x$flacdec_builtin = xyes)
  3123. AM_CONDITIONAL(lpcm_plugin, test x$lpcm_plugin = xyes)
  3124. AM_CONDITIONAL(lpcm_builtin, test x$lpcm_builtin = xyes)
  3125. AM_CONDITIONAL(araw_plugin, test x$araw_plugin = xyes)
  3126. AM_CONDITIONAL(araw_builtin, test x$araw_builtin = xyes)
  3127. AC_SUBST(LDFLAGS_vorbis)
  3128. AM_CONDITIONAL(vorbis_plugin, test x$vorbis_plugin = xyes)
  3129. AM_CONDITIONAL(vorbis_builtin, test x$vorbis_builtin = xyes)
  3130. AC_SUBST(CPPFLAGS_tarkin)
  3131. AC_SUBST(LDFLAGS_tarkin)
  3132. AM_CONDITIONAL(tarkin_plugin, test x$tarkin_plugin = xyes)
  3133. AM_CONDITIONAL(tarkin_builtin, test x$tarkin_builtin = xyes)
  3134. AC_SUBST(LDFLAGS_theora)
  3135. AM_CONDITIONAL(theora_plugin, test x$theora_plugin = xyes)
  3136. AM_CONDITIONAL(theora_builtin, test x$theora_builtin = xyes)
  3137. AC_SUBST(LDFLAGS_tremor)
  3138. AM_CONDITIONAL(tremor_plugin, test x$tremor_plugin = xyes)
  3139. AM_CONDITIONAL(tremor_builtin, test x$tremor_builtin = xyes)
  3140. AC_SUBST(LDFLAGS_dv)
  3141. AM_CONDITIONAL(dv_plugin, test x$dv_plugin = xyes)
  3142. AM_CONDITIONAL(dv_builtin, test x$dv_builtin = xyes)
  3143. AC_SUBST(CPPFLAGS_xvid)
  3144. AC_SUBST(LDFLAGS_xvid)
  3145. AM_CONDITIONAL(xvid_plugin, test x$xvid_plugin = xyes)
  3146. AM_CONDITIONAL(xvid_builtin, test x$xvid_builtin = xyes)
  3147. AM_CONDITIONAL(adpcm_plugin, test x$adpcm_plugin = xyes)
  3148. AM_CONDITIONAL(adpcm_builtin, test x$adpcm_builtin = xyes)
  3149. AM_CONDITIONAL(mpeg_audio_plugin, test x$mpeg_audio_plugin = xyes)
  3150. AM_CONDITIONAL(mpeg_audio_builtin, test x$mpeg_audio_builtin = xyes)
  3151. AC_SUBST(LDFLAGS_libmpeg2)
  3152. AM_CONDITIONAL(libmpeg2_plugin, test x$libmpeg2_plugin = xyes)
  3153. AM_CONDITIONAL(libmpeg2_builtin, test x$libmpeg2_builtin = xyes)
  3154. AM_CONDITIONAL(rawvideo_plugin, test x$rawvideo_plugin = xyes)
  3155. AM_CONDITIONAL(rawvideo_builtin, test x$rawvideo_builtin = xyes)
  3156. AM_CONDITIONAL(a52old_plugin, test x$a52old_plugin = xyes)
  3157. AM_CONDITIONAL(a52old_builtin, test x$a52old_builtin = xyes)
  3158. AM_CONDITIONAL(downmix_plugin, test x$downmix_plugin = xyes)
  3159. AM_CONDITIONAL(downmix_builtin, test x$downmix_builtin = xyes)
  3160. AM_CONDITIONAL(downmixsse_plugin, test x$downmixsse_plugin = xyes)
  3161. AM_CONDITIONAL(downmixsse_builtin, test x$downmixsse_builtin = xyes)
  3162. AM_CONDITIONAL(downmix3dn_plugin, test x$downmix3dn_plugin = xyes)
  3163. AM_CONDITIONAL(downmix3dn_builtin, test x$downmix3dn_builtin = xyes)
  3164. AC_SUBST(LDFLAGS_imdct)
  3165. AM_CONDITIONAL(imdct_plugin, test x$imdct_plugin = xyes)
  3166. AM_CONDITIONAL(imdct_builtin, test x$imdct_builtin = xyes)
  3167. AC_SUBST(LDFLAGS_imdctsse)
  3168. AM_CONDITIONAL(imdctsse_plugin, test x$imdctsse_plugin = xyes)
  3169. AM_CONDITIONAL(imdctsse_builtin, test x$imdctsse_builtin = xyes)
  3170. AC_SUBST(LDFLAGS_imdct3dn)
  3171. AM_CONDITIONAL(imdct3dn_plugin, test x$imdct3dn_plugin = xyes)
  3172. AM_CONDITIONAL(imdct3dn_builtin, test x$imdct3dn_builtin = xyes)
  3173. AM_CONDITIONAL(cinepak_plugin, test x$cinepak_plugin = xyes)
  3174. AM_CONDITIONAL(cinepak_builtin, test x$cinepak_builtin = xyes)
  3175. AC_SUBST(CPPFLAGS_faad)
  3176. AC_SUBST(LDFLAGS_faad)
  3177. AM_CONDITIONAL(faad_plugin, test x$faad_plugin = xyes)
  3178. AM_CONDITIONAL(faad_builtin, test x$faad_builtin = xyes)
  3179. AC_SUBST(CPPFLAGS_ffmpeg)
  3180. AC_SUBST(LDFLAGS_ffmpeg)
  3181. AM_CONDITIONAL(ffmpeg_plugin, test x$ffmpeg_plugin = xyes)
  3182. AM_CONDITIONAL(ffmpeg_builtin, test x$ffmpeg_builtin = xyes)
  3183. AM_CONDITIONAL(postprocessing_c_plugin, test x$postprocessing_c_plugin = xyes)
  3184. AM_CONDITIONAL(postprocessing_c_builtin, test x$postprocessing_c_builtin = xyes)
  3185. AM_CONDITIONAL(postprocessing_mmx_plugin, test x$postprocessing_mmx_plugin = xyes)
  3186. AM_CONDITIONAL(postprocessing_mmx_builtin, test x$postprocessing_mmx_builtin = xyes)
  3187. AM_CONDITIONAL(postprocessing_mmxext_plugin, test x$postprocessing_mmxext_plugin = xyes)
  3188. AM_CONDITIONAL(postprocessing_mmxext_builtin, test x$postprocessing_mmxext_builtin = xyes)
  3189. AC_SUBST(CFLAGS_mpeg_video)
  3190. AM_CONDITIONAL(mpeg_video_plugin, test x$mpeg_video_plugin = xyes)
  3191. AM_CONDITIONAL(mpeg_video_builtin, test x$mpeg_video_builtin = xyes)
  3192. AM_CONDITIONAL(idct_plugin, test x$idct_plugin = xyes)
  3193. AM_CONDITIONAL(idct_builtin, test x$idct_builtin = xyes)
  3194. AM_CONDITIONAL(idctclassic_plugin, test x$idctclassic_plugin = xyes)
  3195. AM_CONDITIONAL(idctclassic_builtin, test x$idctclassic_builtin = xyes)
  3196. AM_CONDITIONAL(idctmmx_plugin, test x$idctmmx_plugin = xyes)
  3197. AM_CONDITIONAL(idctmmx_builtin, test x$idctmmx_builtin = xyes)
  3198. AM_CONDITIONAL(idctmmxext_plugin, test x$idctmmxext_plugin = xyes)
  3199. AM_CONDITIONAL(idctmmxext_builtin, test x$idctmmxext_builtin = xyes)
  3200. AC_SUBST(CFLAGS_idctaltivec)
  3201. AC_SUBST(LDFLAGS_idctaltivec)
  3202. AM_CONDITIONAL(idctaltivec_plugin, test x$idctaltivec_plugin = xyes)
  3203. AM_CONDITIONAL(idctaltivec_builtin, test x$idctaltivec_builtin = xyes)
  3204. AM_CONDITIONAL(motion_plugin, test x$motion_plugin = xyes)
  3205. AM_CONDITIONAL(motion_builtin, test x$motion_builtin = xyes)
  3206. AM_CONDITIONAL(motionmmx_plugin, test x$motionmmx_plugin = xyes)
  3207. AM_CONDITIONAL(motionmmx_builtin, test x$motionmmx_builtin = xyes)
  3208. AM_CONDITIONAL(motionmmxext_plugin, test x$motionmmxext_plugin = xyes)
  3209. AM_CONDITIONAL(motionmmxext_builtin, test x$motionmmxext_builtin = xyes)
  3210. AM_CONDITIONAL(motion3dnow_plugin, test x$motion3dnow_plugin = xyes)
  3211. AM_CONDITIONAL(motion3dnow_builtin, test x$motion3dnow_builtin = xyes)
  3212. AC_SUBST(CFLAGS_motionaltivec)
  3213. AC_SUBST(LDFLAGS_motionaltivec)
  3214. AM_CONDITIONAL(motionaltivec_plugin, test x$motionaltivec_plugin = xyes)
  3215. AM_CONDITIONAL(motionaltivec_builtin, test x$motionaltivec_builtin = xyes)
  3216. AM_CONDITIONAL(spudec_plugin, test x$spudec_plugin = xyes)
  3217. AM_CONDITIONAL(spudec_builtin, test x$spudec_builtin = xyes)
  3218. AC_SUBST(LDFLAGS_lirc)
  3219. AM_CONDITIONAL(lirc_plugin, test x$lirc_plugin = xyes)
  3220. AM_CONDITIONAL(lirc_builtin, test x$lirc_builtin = xyes)
  3221. AM_CONDITIONAL(rc_plugin, test x$rc_plugin = xyes)
  3222. AM_CONDITIONAL(rc_builtin, test x$rc_builtin = xyes)
  3223. AM_CONDITIONAL(gestures_plugin, test x$gestures_plugin = xyes)
  3224. AM_CONDITIONAL(gestures_builtin, test x$gestures_builtin = xyes)
  3225. AM_CONDITIONAL(a52sys_plugin, test x$a52sys_plugin = xyes)
  3226. AM_CONDITIONAL(a52sys_builtin, test x$a52sys_builtin = xyes)
  3227. AM_CONDITIONAL(flac_plugin, test x$flac_plugin = xyes)
  3228. AM_CONDITIONAL(flac_builtin, test x$flac_builtin = xyes)
  3229. AC_SUBST(CPPFLAGS_ogg)
  3230. AC_SUBST(LDFLAGS_ogg)
  3231. AM_CONDITIONAL(ogg_plugin, test x$ogg_plugin = xyes)
  3232. AM_CONDITIONAL(ogg_builtin, test x$ogg_builtin = xyes)
  3233. AM_CONDITIONAL(m3u_plugin, test x$m3u_plugin = xyes)
  3234. AM_CONDITIONAL(m3u_builtin, test x$m3u_builtin = xyes)
  3235. AM_CONDITIONAL(demuxdump_plugin, test x$demuxdump_plugin = xyes)
  3236. AM_CONDITIONAL(demuxdump_builtin, test x$demuxdump_builtin = xyes)
  3237. AM_CONDITIONAL(rawdv_plugin, test x$rawdv_plugin = xyes)
  3238. AM_CONDITIONAL(rawdv_builtin, test x$rawdv_builtin = xyes)
  3239. AM_CONDITIONAL(au_plugin, test x$au_plugin = xyes)
  3240. AM_CONDITIONAL(au_builtin, test x$au_builtin = xyes)
  3241. AM_CONDITIONAL(aac_plugin, test x$aac_plugin = xyes)
  3242. AM_CONDITIONAL(aac_builtin, test x$aac_builtin = xyes)
  3243. AM_CONDITIONAL(avi_plugin, test x$avi_plugin = xyes)
  3244. AM_CONDITIONAL(avi_builtin, test x$avi_builtin = xyes)
  3245. AM_CONDITIONAL(asf_plugin, test x$asf_plugin = xyes)
  3246. AM_CONDITIONAL(asf_builtin, test x$asf_builtin = xyes)
  3247. AC_SUBST(LDFLAGS_mp4)
  3248. AM_CONDITIONAL(mp4_plugin, test x$mp4_plugin = xyes)
  3249. AM_CONDITIONAL(mp4_builtin, test x$mp4_builtin = xyes)
  3250. AM_CONDITIONAL(mpeg_system_plugin, test x$mpeg_system_plugin = xyes)
  3251. AM_CONDITIONAL(mpeg_system_builtin, test x$mpeg_system_builtin = xyes)
  3252. AM_CONDITIONAL(es_plugin, test x$es_plugin = xyes)
  3253. AM_CONDITIONAL(es_builtin, test x$es_builtin = xyes)
  3254. AM_CONDITIONAL(m4v_plugin, test x$m4v_plugin = xyes)
  3255. AM_CONDITIONAL(m4v_builtin, test x$m4v_builtin = xyes)
  3256. AM_CONDITIONAL(ps_plugin, test x$ps_plugin = xyes)
  3257. AM_CONDITIONAL(ps_builtin, test x$ps_builtin = xyes)
  3258. AM_CONDITIONAL(ts_plugin, test x$ts_plugin = xyes)
  3259. AM_CONDITIONAL(ts_builtin, test x$ts_builtin = xyes)
  3260. AC_SUBST(CPPFLAGS_ts_dvbpsi)
  3261. AC_SUBST(LDFLAGS_ts_dvbpsi)
  3262. AM_CONDITIONAL(ts_dvbpsi_plugin, test x$ts_dvbpsi_plugin = xyes)
  3263. AM_CONDITIONAL(ts_dvbpsi_builtin, test x$ts_dvbpsi_builtin = xyes)
  3264. AM_CONDITIONAL(audio_plugin, test x$audio_plugin = xyes)
  3265. AM_CONDITIONAL(audio_builtin, test x$audio_builtin = xyes)
  3266. AM_CONDITIONAL(id3_plugin, test x$id3_plugin = xyes)
  3267. AM_CONDITIONAL(id3_builtin, test x$id3_builtin = xyes)
  3268. AC_SUBST(LDFLAGS_id3tag)
  3269. AM_CONDITIONAL(id3tag_plugin, test x$id3tag_plugin = xyes)
  3270. AM_CONDITIONAL(id3tag_builtin, test x$id3tag_builtin = xyes)
  3271. AM_CONDITIONAL(demuxsub_plugin, test x$demuxsub_plugin = xyes)
  3272. AM_CONDITIONAL(demuxsub_builtin, test x$demuxsub_builtin = xyes)
  3273. AM_CONDITIONAL(wav_plugin, test x$wav_plugin = xyes)
  3274. AM_CONDITIONAL(wav_builtin, test x$wav_builtin = xyes)
  3275. AM_CONDITIONAL(encoder_xvid_plugin, test x$encoder_xvid_plugin = xyes)
  3276. AM_CONDITIONAL(encoder_xvid_builtin, test x$encoder_xvid_builtin = xyes)
  3277. AM_CONDITIONAL(encoder_ffmpeg_plugin, test x$encoder_ffmpeg_plugin = xyes)
  3278. AM_CONDITIONAL(encoder_ffmpeg_builtin, test x$encoder_ffmpeg_builtin = xyes)
  3279. AC_SUBST(LDFLAGS_beos)
  3280. AM_CONDITIONAL(beos_plugin, test x$beos_plugin = xyes)
  3281. AM_CONDITIONAL(beos_builtin, test x$beos_builtin = xyes)
  3282. AC_SUBST(CFLAGS_familiar)
  3283. AC_SUBST(LDFLAGS_familiar)
  3284. AM_CONDITIONAL(familiar_plugin, test x$familiar_plugin = xyes)
  3285. AM_CONDITIONAL(familiar_builtin, test x$familiar_builtin = xyes)
  3286. AC_SUBST(CFLAGS_gtk)
  3287. AC_SUBST(LDFLAGS_gtk)
  3288. AM_CONDITIONAL(gtk_plugin, test x$gtk_plugin = xyes)
  3289. AM_CONDITIONAL(gtk_builtin, test x$gtk_builtin = xyes)
  3290. AC_SUBST(CFLAGS_gnome)
  3291. AC_SUBST(LDFLAGS_gnome)
  3292. AM_CONDITIONAL(gnome_plugin, test x$gnome_plugin = xyes)
  3293. AM_CONDITIONAL(gnome_builtin, test x$gnome_builtin = xyes)
  3294. AC_SUBST(CFLAGS_gtk2)
  3295. AC_SUBST(LDFLAGS_gtk2)
  3296. AM_CONDITIONAL(gtk2_plugin, test x$gtk2_plugin = xyes)
  3297. AM_CONDITIONAL(gtk2_builtin, test x$gtk2_builtin = xyes)
  3298. AC_SUBST(CFLAGS_gnome2)
  3299. AC_SUBST(LDFLAGS_gnome2)
  3300. AM_CONDITIONAL(gnome2_plugin, test x$gnome2_plugin = xyes)
  3301. AM_CONDITIONAL(gnome2_builtin, test x$gnome2_builtin = xyes)
  3302. AC_SUBST(CPPFLAGS_kde)
  3303. AC_SUBST(LDFLAGS_kde)
  3304. AM_CONDITIONAL(kde_plugin, test x$kde_plugin = xyes)
  3305. AM_CONDITIONAL(kde_builtin, test x$kde_builtin = xyes)
  3306. AC_SUBST(LDFLAGS_macosx)
  3307. AM_CONDITIONAL(macosx_plugin, test x$macosx_plugin = xyes)
  3308. AM_CONDITIONAL(macosx_builtin, test x$macosx_builtin = xyes)
  3309. AC_SUBST(LDFLAGS_ncurses)
  3310. AM_CONDITIONAL(ncurses_plugin, test x$ncurses_plugin = xyes)
  3311. AM_CONDITIONAL(ncurses_builtin, test x$ncurses_builtin = xyes)
  3312. AC_SUBST(LDFLAGS_qnx)
  3313. AM_CONDITIONAL(qnx_plugin, test x$qnx_plugin = xyes)
  3314. AM_CONDITIONAL(qnx_builtin, test x$qnx_builtin = xyes)
  3315. AC_SUBST(CPPFLAGS_qt)
  3316. AC_SUBST(LDFLAGS_qt)
  3317. AM_CONDITIONAL(qt_plugin, test x$qt_plugin = xyes)
  3318. AM_CONDITIONAL(qt_builtin, test x$qt_builtin = xyes)
  3319. AC_SUBST(CPPFLAGS_skins)
  3320. AC_SUBST(LDFLAGS_skins)
  3321. AM_CONDITIONAL(skins_plugin, test x$skins_plugin = xyes)
  3322. AM_CONDITIONAL(skins_builtin, test x$skins_builtin = xyes)
  3323. AM_CONDITIONAL(win32_plugin, test x$win32_plugin = xyes)
  3324. AM_CONDITIONAL(win32_builtin, test x$win32_builtin = xyes)
  3325. AC_SUBST(CXXFLAGS_wxwindows)
  3326. AC_SUBST(LDFLAGS_wxwindows)
  3327. AM_CONDITIONAL(wxwindows_plugin, test x$wxwindows_plugin = xyes)
  3328. AM_CONDITIONAL(wxwindows_builtin, test x$wxwindows_builtin = xyes)
  3329. AC_SUBST(CFLAGS_gtk_main)
  3330. AC_SUBST(LDFLAGS_gtk_main)
  3331. AM_CONDITIONAL(gtk_main_plugin, test x$gtk_main_plugin = xyes)
  3332. AM_CONDITIONAL(gtk_main_builtin, test x$gtk_main_builtin = xyes)
  3333. AC_SUBST(CFLAGS_gnome_main)
  3334. AC_SUBST(LDFLAGS_gnome_main)
  3335. AM_CONDITIONAL(gnome_main_plugin, test x$gnome_main_plugin = xyes)
  3336. AM_CONDITIONAL(gnome_main_builtin, test x$gnome_main_builtin = xyes)
  3337. AC_SUBST(CFLAGS_gtk2_main)
  3338. AC_SUBST(LDFLAGS_gtk2_main)
  3339. AM_CONDITIONAL(gtk2_main_plugin, test x$gtk2_main_plugin = xyes)
  3340. AM_CONDITIONAL(gtk2_main_builtin, test x$gtk2_main_builtin = xyes)
  3341. AC_SUBST(CFLAGS_gnome2_main)
  3342. AC_SUBST(LDFLAGS_gnome2_main)
  3343. AM_CONDITIONAL(gnome2_main_plugin, test x$gnome2_main_plugin = xyes)
  3344. AM_CONDITIONAL(gnome2_main_builtin, test x$gnome2_main_builtin = xyes)
  3345. AC_SUBST(LDFLAGS_sap)
  3346. AM_CONDITIONAL(sap_plugin, test x$sap_plugin = xyes)
  3347. AM_CONDITIONAL(sap_builtin, test x$sap_builtin = xyes)
  3348. AM_CONDITIONAL(screensaver_plugin, test x$screensaver_plugin = xyes)
  3349. AM_CONDITIONAL(screensaver_builtin, test x$screensaver_builtin = xyes)
  3350. AC_SUBST(CPPFLAGS_qte_main)
  3351. AC_SUBST(LDFLAGS_qte_main)
  3352. AM_CONDITIONAL(qte_main_plugin, test x$qte_main_plugin = xyes)
  3353. AM_CONDITIONAL(qte_main_builtin, test x$qte_main_builtin = xyes)
  3354. AC_SUBST(LDFLAGS_httpd)
  3355. AM_CONDITIONAL(httpd_plugin, test x$httpd_plugin = xyes)
  3356. AM_CONDITIONAL(httpd_builtin, test x$httpd_builtin = xyes)
  3357. AM_CONDITIONAL(dummy_plugin, test x$dummy_plugin = xyes)
  3358. AM_CONDITIONAL(dummy_builtin, test x$dummy_builtin = xyes)
  3359. AM_CONDITIONAL(logger_plugin, test x$logger_plugin = xyes)
  3360. AM_CONDITIONAL(logger_builtin, test x$logger_builtin = xyes)
  3361. AM_CONDITIONAL(memcpy_plugin, test x$memcpy_plugin = xyes)
  3362. AM_CONDITIONAL(memcpy_builtin, test x$memcpy_builtin = xyes)
  3363. AM_CONDITIONAL(memcpymmx_plugin, test x$memcpymmx_plugin = xyes)
  3364. AM_CONDITIONAL(memcpymmx_builtin, test x$memcpymmx_builtin = xyes)
  3365. AM_CONDITIONAL(memcpymmxext_plugin, test x$memcpymmxext_plugin = xyes)
  3366. AM_CONDITIONAL(memcpymmxext_builtin, test x$memcpymmxext_builtin = xyes)
  3367. AM_CONDITIONAL(memcpy3dn_plugin, test x$memcpy3dn_plugin = xyes)
  3368. AM_CONDITIONAL(memcpy3dn_builtin, test x$memcpy3dn_builtin = xyes)
  3369. AC_SUBST(CFLAGS_memcpyaltivec)
  3370. AC_SUBST(LDFLAGS_memcpyaltivec)
  3371. AM_CONDITIONAL(memcpyaltivec_plugin, test x$memcpyaltivec_plugin = xyes)
  3372. AM_CONDITIONAL(memcpyaltivec_builtin, test x$memcpyaltivec_builtin = xyes)
  3373. AC_SUBST(LDFLAGS_ipv4)
  3374. AM_CONDITIONAL(ipv4_plugin, test x$ipv4_plugin = xyes)
  3375. AM_CONDITIONAL(ipv4_builtin, test x$ipv4_builtin = xyes)
  3376. AC_SUBST(LDFLAGS_ipv6)
  3377. AM_CONDITIONAL(ipv6_plugin, test x$ipv6_plugin = xyes)
  3378. AM_CONDITIONAL(ipv6_builtin, test x$ipv6_builtin = xyes)
  3379. AM_CONDITIONAL(test1_plugin, test x$test1_plugin = xyes)
  3380. AM_CONDITIONAL(test1_builtin, test x$test1_builtin = xyes)
  3381. AC_SUBST(CXXFLAGS_test2)
  3382. AM_CONDITIONAL(test2_plugin, test x$test2_plugin = xyes)
  3383. AM_CONDITIONAL(test2_builtin, test x$test2_builtin = xyes)
  3384. AC_SUBST(OBJCFLAGS_test3)
  3385. AC_SUBST(LDFLAGS_test3)
  3386. AM_CONDITIONAL(test3_plugin, test x$test3_plugin = xyes)
  3387. AM_CONDITIONAL(test3_builtin, test x$test3_builtin = xyes)
  3388. AM_CONDITIONAL(test4_plugin, test x$test4_plugin = xyes)
  3389. AM_CONDITIONAL(test4_builtin, test x$test4_builtin = xyes)
  3390. AM_CONDITIONAL(mux_dummy_plugin, test x$mux_dummy_plugin = xyes)
  3391. AM_CONDITIONAL(mux_dummy_builtin, test x$mux_dummy_builtin = xyes)
  3392. AM_CONDITIONAL(mux_avi_plugin, test x$mux_avi_plugin = xyes)
  3393. AM_CONDITIONAL(mux_avi_builtin, test x$mux_avi_builtin = xyes)
  3394. AC_SUBST(LDFLAGS_mux_ogg)
  3395. AM_CONDITIONAL(mux_ogg_plugin, test x$mux_ogg_plugin = xyes)
  3396. AM_CONDITIONAL(mux_ogg_builtin, test x$mux_ogg_builtin = xyes)
  3397. AM_CONDITIONAL(mux_ps_plugin, test x$mux_ps_plugin = xyes)
  3398. AM_CONDITIONAL(mux_ps_builtin, test x$mux_ps_builtin = xyes)
  3399. AM_CONDITIONAL(mux_ts_plugin, test x$mux_ts_plugin = xyes)
  3400. AM_CONDITIONAL(mux_ts_builtin, test x$mux_ts_builtin = xyes)
  3401. AC_SUBST(CPPFLAGS_mux_ts_dvbpsi)
  3402. AC_SUBST(LDFLAGS_mux_ts_dvbpsi)
  3403. AM_CONDITIONAL(mux_ts_dvbpsi_plugin, test x$mux_ts_dvbpsi_plugin = xyes)
  3404. AM_CONDITIONAL(mux_ts_dvbpsi_builtin, test x$mux_ts_dvbpsi_builtin = xyes)
  3405. AM_CONDITIONAL(packetizer_copy_plugin, test x$packetizer_copy_plugin = xyes)
  3406. AM_CONDITIONAL(packetizer_copy_builtin, test x$packetizer_copy_builtin = xyes)
  3407. AM_CONDITIONAL(packetizer_a52_plugin, test x$packetizer_a52_plugin = xyes)
  3408. AM_CONDITIONAL(packetizer_a52_builtin, test x$packetizer_a52_builtin = xyes)
  3409. AM_CONDITIONAL(packetizer_mpegaudio_plugin, test x$packetizer_mpegaudio_plugin = xyes)
  3410. AM_CONDITIONAL(packetizer_mpegaudio_builtin, test x$packetizer_mpegaudio_builtin = xyes)
  3411. AM_CONDITIONAL(packetizer_mpegvideo_plugin, test x$packetizer_mpegvideo_plugin = xyes)
  3412. AM_CONDITIONAL(packetizer_mpegvideo_builtin, test x$packetizer_mpegvideo_builtin = xyes)
  3413. AM_CONDITIONAL(packetizer_mpeg4video_plugin, test x$packetizer_mpeg4video_plugin = xyes)
  3414. AM_CONDITIONAL(packetizer_mpeg4video_builtin, test x$packetizer_mpeg4video_builtin = xyes)
  3415. AM_CONDITIONAL(packetizer_mpeg4audio_plugin, test x$packetizer_mpeg4audio_plugin = xyes)
  3416. AM_CONDITIONAL(packetizer_mpeg4audio_builtin, test x$packetizer_mpeg4audio_builtin = xyes)
  3417. AC_SUBST(LDFLAGS_i420_rgb)
  3418. AM_CONDITIONAL(i420_rgb_plugin, test x$i420_rgb_plugin = xyes)
  3419. AM_CONDITIONAL(i420_rgb_builtin, test x$i420_rgb_builtin = xyes)
  3420. AM_CONDITIONAL(i420_rgb_mmx_plugin, test x$i420_rgb_mmx_plugin = xyes)
  3421. AM_CONDITIONAL(i420_rgb_mmx_builtin, test x$i420_rgb_mmx_builtin = xyes)
  3422. AM_CONDITIONAL(i420_yuy2_plugin, test x$i420_yuy2_plugin = xyes)
  3423. AM_CONDITIONAL(i420_yuy2_builtin, test x$i420_yuy2_builtin = xyes)
  3424. AC_SUBST(CFLAGS_i420_yuy2_mmx)
  3425. AM_CONDITIONAL(i420_yuy2_mmx_plugin, test x$i420_yuy2_mmx_plugin = xyes)
  3426. AM_CONDITIONAL(i420_yuy2_mmx_builtin, test x$i420_yuy2_mmx_builtin = xyes)
  3427. AM_CONDITIONAL(i422_yuy2_plugin, test x$i422_yuy2_plugin = xyes)
  3428. AM_CONDITIONAL(i422_yuy2_builtin, test x$i422_yuy2_builtin = xyes)
  3429. AM_CONDITIONAL(i422_yuy2_mmx_plugin, test x$i422_yuy2_mmx_plugin = xyes)
  3430. AM_CONDITIONAL(i422_yuy2_mmx_builtin, test x$i422_yuy2_mmx_builtin = xyes)
  3431. AM_CONDITIONAL(i420_ymga_plugin, test x$i420_ymga_plugin = xyes)
  3432. AM_CONDITIONAL(i420_ymga_builtin, test x$i420_ymga_builtin = xyes)
  3433. AM_CONDITIONAL(i420_ymga_mmx_plugin, test x$i420_ymga_mmx_plugin = xyes)
  3434. AM_CONDITIONAL(i420_ymga_mmx_builtin, test x$i420_ymga_mmx_builtin = xyes)
  3435. AM_CONDITIONAL(transform_plugin, test x$transform_plugin = xyes)
  3436. AM_CONDITIONAL(transform_builtin, test x$transform_builtin = xyes)
  3437. AM_CONDITIONAL(invert_plugin, test x$invert_plugin = xyes)
  3438. AM_CONDITIONAL(invert_builtin, test x$invert_builtin = xyes)
  3439. AC_SUBST(LDFLAGS_adjust)
  3440. AM_CONDITIONAL(adjust_plugin, test x$adjust_plugin = xyes)
  3441. AM_CONDITIONAL(adjust_builtin, test x$adjust_builtin = xyes)
  3442. AC_SUBST(LDFLAGS_distort)
  3443. AM_CONDITIONAL(distort_plugin, test x$distort_plugin = xyes)
  3444. AM_CONDITIONAL(distort_builtin, test x$distort_builtin = xyes)
  3445. AM_CONDITIONAL(wall_plugin, test x$wall_plugin = xyes)
  3446. AM_CONDITIONAL(wall_builtin, test x$wall_builtin = xyes)
  3447. AM_CONDITIONAL(clone_plugin, test x$clone_plugin = xyes)
  3448. AM_CONDITIONAL(clone_builtin, test x$clone_builtin = xyes)
  3449. AM_CONDITIONAL(crop_plugin, test x$crop_plugin = xyes)
  3450. AM_CONDITIONAL(crop_builtin, test x$crop_builtin = xyes)
  3451. AM_CONDITIONAL(motionblur_plugin, test x$motionblur_plugin = xyes)
  3452. AM_CONDITIONAL(motionblur_builtin, test x$motionblur_builtin = xyes)
  3453. AC_SUBST(CFLAGS_osdtext)
  3454. AC_SUBST(LDFLAGS_osdtext)
  3455. AM_CONDITIONAL(osdtext_plugin, test x$osdtext_plugin = xyes)
  3456. AM_CONDITIONAL(osdtext_builtin, test x$osdtext_builtin = xyes)
  3457. AM_CONDITIONAL(deinterlace_plugin, test x$deinterlace_plugin = xyes)
  3458. AM_CONDITIONAL(deinterlace_builtin, test x$deinterlace_builtin = xyes)
  3459. AC_SUBST(LDFLAGS_aa)
  3460. AM_CONDITIONAL(aa_plugin, test x$aa_plugin = xyes)
  3461. AM_CONDITIONAL(aa_builtin, test x$aa_builtin = xyes)
  3462. AM_CONDITIONAL(fb_plugin, test x$fb_plugin = xyes)
  3463. AM_CONDITIONAL(fb_builtin, test x$fb_builtin = xyes)
  3464. AC_SUBST(CPPFLAGS_ggi)
  3465. AC_SUBST(LDFLAGS_ggi)
  3466. AM_CONDITIONAL(ggi_plugin, test x$ggi_plugin = xyes)
  3467. AM_CONDITIONAL(ggi_builtin, test x$ggi_builtin = xyes)
  3468. AC_SUBST(CPPFLAGS_glide)
  3469. AC_SUBST(LDFLAGS_glide)
  3470. AM_CONDITIONAL(glide_plugin, test x$glide_plugin = xyes)
  3471. AM_CONDITIONAL(glide_builtin, test x$glide_builtin = xyes)
  3472. AC_SUBST(CFLAGS_vout_sdl)
  3473. AC_SUBST(LDFLAGS_vout_sdl)
  3474. AM_CONDITIONAL(vout_sdl_plugin, test x$vout_sdl_plugin = xyes)
  3475. AM_CONDITIONAL(vout_sdl_builtin, test x$vout_sdl_builtin = xyes)
  3476. AC_SUBST(LDFLAGS_svgalib)
  3477. AM_CONDITIONAL(svgalib_plugin, test x$svgalib_plugin = xyes)
  3478. AM_CONDITIONAL(svgalib_builtin, test x$svgalib_builtin = xyes)
  3479. AC_SUBST(LDFLAGS_wingdi)
  3480. AM_CONDITIONAL(wingdi_plugin, test x$wingdi_plugin = xyes)
  3481. AM_CONDITIONAL(wingdi_builtin, test x$wingdi_builtin = xyes)
  3482. AM_CONDITIONAL(vout_encoder_plugin, test x$vout_encoder_plugin = xyes)
  3483. AM_CONDITIONAL(vout_encoder_builtin, test x$vout_encoder_builtin = xyes)
  3484. AC_SUBST(CPPFLAGS_vout_directx)
  3485. AC_SUBST(LDFLAGS_vout_directx)
  3486. AM_CONDITIONAL(vout_directx_plugin, test x$vout_directx_plugin = xyes)
  3487. AM_CONDITIONAL(vout_directx_builtin, test x$vout_directx_builtin = xyes)
  3488. AM_CONDITIONAL(mga_plugin, test x$mga_plugin = xyes)
  3489. AM_CONDITIONAL(mga_builtin, test x$mga_builtin = xyes)
  3490. AM_CONDITIONAL(xmga_plugin, test x$xmga_plugin = xyes)
  3491. AM_CONDITIONAL(xmga_builtin, test x$xmga_builtin = xyes)
  3492. AC_SUBST(CPPFLAGS_qte)
  3493. AC_SUBST(LDFLAGS_qte)
  3494. AM_CONDITIONAL(qte_plugin, test x$qte_plugin = xyes)
  3495. AM_CONDITIONAL(qte_builtin, test x$qte_builtin = xyes)
  3496. AC_SUBST(CPPFLAGS_x11)
  3497. AC_SUBST(LDFLAGS_x11)
  3498. AM_CONDITIONAL(x11_plugin, test x$x11_plugin = xyes)
  3499. AM_CONDITIONAL(x11_builtin, test x$x11_builtin = xyes)
  3500. AC_SUBST(CPPFLAGS_xvideo)
  3501. AC_SUBST(LDFLAGS_xvideo)
  3502. AM_CONDITIONAL(xvideo_plugin, test x$xvideo_plugin = xyes)
  3503. AM_CONDITIONAL(xvideo_builtin, test x$xvideo_builtin = xyes)
  3504. AM_CONDITIONAL(scope_plugin, test x$scope_plugin = xyes)
  3505. AM_CONDITIONAL(scope_builtin, test x$scope_builtin = xyes)
  3506. AC_SUBST(LDFLAGS_xosd)
  3507. AM_CONDITIONAL(xosd_plugin, test x$xosd_plugin = xyes)
  3508. AM_CONDITIONAL(xosd_builtin, test x$xosd_builtin = xyes)
  3509. AM_CONDITIONAL(UNTRUE, false)
  3510. dnl do not touch this line (bootstrap needs it)
  3511.  
  3512.  
  3513. dnl
  3514. dnl  Stuff used by the program
  3515. dnl
  3516. AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION} ${CODENAME}", [Simple version string])
  3517. AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VLC media player - version ${VERSION} ${CODENAME} - (c) 1996-2003 VideoLAN", [Copyright string])
  3518. AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line])
  3519.  
  3520. VLC_SYMBOL="`echo ${VERSION} | sed -e 'y/.-/__/'`"
  3521. AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${VLC_SYMBOL}", [String suffix for module functions])
  3522. AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions])
  3523. AC_DEFINE_UNQUOTED(LIBEXT, "${LIBEXT}", [Dynamic object extension])
  3524.  
  3525. DATA_PATH="${ac_tool_prefix}/share/vlc"
  3526. AC_SUBST(DATA_PATH)
  3527. PLUGIN_PATH="${ac_tool_prefix}/lib/vlc"
  3528. AC_SUBST(PLUGIN_PATH)
  3529.  
  3530. dnl
  3531. dnl  Restore *FLAGS
  3532. dnl
  3533. CPPFLAGS="${CPPFLAGS_save}"
  3534. CFLAGS="${CFLAGS_save}"
  3535. CXXFLAGS="${CXXFLAGS_save}"
  3536. OBJCFLAGS="${OBJCFLAGS_save}"
  3537. LDFLAGS="${LDFLAGS_save}"
  3538.  
  3539. dnl
  3540. dnl  Fool automake (see Makefile.am)
  3541. dnl
  3542. AUTOMAKE_SUCKS="\$(L_builtin) \$(LDFLAGS_builtin)"
  3543. AC_SUBST(AUTOMAKE_SUCKS)
  3544.  
  3545. dnl
  3546. dnl  Create the vlc-config script
  3547. dnl
  3548. LDFLAGS_libvlc="${LDFLAGS_vlc} ${LDFLAGS_builtins}"
  3549. for i in `echo "${BUILTINS}" | sed -e 's@[^ ]*/@@g'` ; do LDFLAGS_libvlc="${LDFLAGS_libvlc} ${libdir}/vlc/${i}.a `eval echo '$'{LDFLAGS_${i}}`" ; done
  3550.  
  3551. dnl
  3552. dnl  Configuration is finished
  3553. dnl
  3554. AC_SUBST(SYS)
  3555. AC_SUBST(ARCH)
  3556. AC_SUBST(PLUGINS)
  3557. AC_SUBST(BUILTINS)
  3558. AC_SUBST(ALIASES)
  3559. AC_SUBST(ASM)
  3560. AC_SUBST(MOC)
  3561. AC_SUBST(WINDRES)
  3562. AC_SUBST(XPIDL)
  3563. AC_SUBST(LIBEXT)
  3564. AC_SUBST(INCLUDES)
  3565. AC_SUBST(ALL_LINGUAS)
  3566.  
  3567. AC_SUBST(CFLAGS_TUNING)
  3568. AC_SUBST(CFLAGS_OPTIM)
  3569. AC_SUBST(CFLAGS_OPTIM_NODEBUG)
  3570. AC_SUBST(CFLAGS_NOOPTIM)
  3571. AC_SUBST(LDFLAGS)
  3572.  
  3573. AC_SUBST(CFLAGS_vlc)
  3574. AC_SUBST(CFLAGS_pics)
  3575. AC_SUBST(CXXFLAGS_pics)
  3576. AC_SUBST(CFLAGS_plugins)
  3577. AC_SUBST(CXXFLAGS_plugins)
  3578. AC_SUBST(CFLAGS_builtins)
  3579. AC_SUBST(CPPFLAGS_mozilla)
  3580.  
  3581. AC_SUBST(LDFLAGS_vlc)
  3582. AC_SUBST(LDFLAGS_libvlc)
  3583. AC_SUBST(LDFLAGS_plugins)
  3584. AC_SUBST(LDFLAGS_builtins)
  3585. AC_SUBST(LDFLAGS_mozilla)
  3586.  
  3587. AC_OUTPUT([
  3588.   Makefile
  3589.   autotools/Makefile
  3590.   debian/Makefile
  3591.   doc/Makefile
  3592.   intl/Makefile
  3593.   ipkg/Makefile
  3594.   lib/Makefile
  3595.   m4/Makefile
  3596.   modules/Makefile
  3597.   po/Makefile.in
  3598.   share/Makefile
  3599.   src/Makefile
  3600.   vlc-config
  3601. ],[
  3602.   chmod a+x vlc-config
  3603. ])
  3604.  
  3605. printf "
  3606. vlc configuration
  3607. --------------------
  3608. vlc version           : ${VERSION}
  3609. system                : ${SYS}
  3610. architecture          : ${ARCH}
  3611. build flavour         : "
  3612. test "x${DEBUG_TRUE}" = "x" && printf "debug "
  3613. test "x${CPROF_TRUE}" = "x" && printf "cprof "
  3614. test "x${GPROF_TRUE}" = "x" && printf "gprof "
  3615. test "x${OPTIM_TRUE}" = "x" && printf "optim "
  3616. test "x${RELEASE_TRUE}" = "x" && printf "release " || printf "devel "
  3617. echo "
  3618. vlc aliases           :${ALIASES}
  3619.  
  3620. To build vlc and its plugins, type \`make'.
  3621. "
  3622.  
  3623.